[wingide-users] Question/Suggestion: More docstrings

cool-RR cool-rr at cool-rr.com
Mon Aug 23 11:19:20 MDT 2010


On Fri, Mar 5, 2010 at 6:23 PM, cool-RR <cool-rr at cool-rr.com> wrote:
>
> On Fri, Mar 5, 2010 at 6:16 PM, Wingware Support <support at wingware.com>wrote:
>
>> cool-RR wrote:
>>
>>> Refer to this excerpt out of PEP 0257: (Link:
>>> http://www.python.org/dev/peps/pep-0257/#what-is-a-docstring)
>>>
>>> """
>>> String literals occurring elsewhere in Python code may also act as
>>> documentation. They are not recognized by the Python bytecode compiler and
>>> are not accessible as runtime object attributes (i.e. not assigned to
>>> __doc__), but two types of extra docstrings may be extracted by software
>>> tools:
>>>
>>> 1. String literals occurring immediately after a simple assignment at the
>>> top level of a module, class, or __init__ method are called "attribute
>>> docstrings".
>>> 2. String literals occurring immediately after another docstring are
>>> called "additional docstrings".
>>> """
>>>
>>> Is Wing one of these "software tools"? I'd personally enjoy it if Wing
>>> could display these kind of extra comments in the source assistant.
>>>
>>
>> Currently Wing only pays attention to the first docstring in module,
>> class,
>> method, and function scope.
>>
>> This hasn't come up before, as far as I can remember, so I'm not sure how
>> often people really use these other docstring forms.  I could see  that
>> "attribute docstrings" would be useful, though.  I don't get the point of
>> "additional docstrings", however.
>>
>> Thanks,
>>
>>
> Yes, I was mainly thinking about the "attribute docstrings".
>

Have you done any work on fetching "attribute docstrings" and displaying
them in the code assistance tool?


Ram.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/wingide-users/attachments/20100823/b104256b/attachment.html


More information about the wingide-users mailing list