are docstrings for variables a bad idea?

jelle jelleferinga at gmail.com
Fri Apr 21 09:16:23 EDT 2006


Hi Diez,

please take note, this suggestion does not nessecarily apply to
programmers such as you & myself of course for whom any python code is
as transparant  as the API's we write ;')


----
I feared that you meant that - but wasn't sure. This is one of the
often-requested-yet-they-will-never-come features of IDEs for python,
as
this would mean that you'd have type-information available on f.
Consider
this simple example:

f = someRandomlyInstatiatedObject()

Now what is e.g. f.<C-space> to show?
----

why is this ambigious at all?
am i seriously overlooking something?

class jelle:
    def __init__(self):
        '''
        we've been having this for a while, just the helpful
constructor docstring
        '''
        '''relates drag to speed'''
        self.terribleNamedMethod = 'of a programmer i will not
disclose'

j = jelle() shows the proper docstring al'right....




More information about the Python-list mailing list