[wingide-users] epydoc!

Linos info at linos.es
Tue Oct 4 08:32:07 MDT 2011

El 04/10/11 16:24, Stephan Deibel escribió:
> On 10/4/11 2:58 AM, Linos wrote:
>> +1 as well, i have read herehttp://epydoc.sourceforge.net/manual-docstring.html
>> that with epydoc you can document individual variables inside code, so if wing
>> ide add support for this feature we will have all the support we need to type
>> annotations using a python standard (epydoc), i think this would be a killer
>> feature for Wing IDE given the impossibility of the language to allow a perfect
>> type static analysis.
> Another thing to consider in this is that in Python 3 you have a standard syntax
> that can be used for type annotations for function/method args:
> def foo(x:int, y:list):
>   pass
> The annotation can also be a string:
> def foo(x:"something", y:"something else"):
>   pass
> Or anything:
> def foo(x:(int, "something"), y:(list, "something else")):
>   pass
> Then foo.__annotations__ contains a dict from arg name to the annotation value
> at runtime.  For example for the last one above:
>>>> foo.__annotations__
> {'y': (<class 'list'>, 'something else'), 'x': (<class 'int'>, 'something')}
> Thought I'd mention it for those that aren't aware of it, although looking at
> this I think maybe putting arg descriptions in the docstring like in epydoc is
> better.  Having simple x:type annotation in the arg list is fine and maybe
> preferable to hiding them in the docstring, but adding docs with arg annotations
> seems hard to read and I don't think there's a standard for how to add both -- I
> just made up using a tuple in the above.
> - Stephan

Yeah i spoke about Python3 native annotations in the first post but many people
will be attached to Python2 for a long time, other than this epydoc lets you
annotate variables in code not only function parameters so it seems like a
better solution.

Maybe Wing IDE could add support for epydoc right now and in the future add
support for Python3 native annotations when Python3 have been adopted by more

Miguel Angel.

More information about the wingide-users mailing list