Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我如何告诉DocstringPyCharm返回类型是SomeClass实例列表?
Docstring
SomeClass
试用:@rtype [SomeClass],但它仅作为list。
@rtype [SomeClass]
list
def do_something(): """ @rtype: list of SomeClass """ pass
效果很好,将返回值解释为列表并SomeClass在访问list元素时自动完成方法。