This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients SpaghettiToastBook, cvrebert, ncoghlan, terry.reedy
Date 2013-07-01.08:35:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1372667711.09.0.322623674208.issue18335@psf.upfronthosting.co.za>
In-reply-to
Content
It turns out there's one slight wrinkle in this grand plan: it won't work for docstrings without some additional tweaking to allow for method calls in the docstring detection.

>>> def f():
...     """example""".lower()
... 
>>> print(f.__doc__)
None
>>> import dis
>>> dis.dis(f)
  2           0 LOAD_CONST               1 ('example') 
              3 LOAD_ATTR                0 (lower) 
              6 CALL_FUNCTION            0 (0 positional, 0 keyword pair) 
              9 POP_TOP              
             10 LOAD_CONST               0 (None) 
             13 RETURN_VALUE
History
Date User Action Args
2013-07-01 08:35:11ncoghlansetrecipients: + ncoghlan, terry.reedy, cvrebert, SpaghettiToastBook
2013-07-01 08:35:11ncoghlansetmessageid: <1372667711.09.0.322623674208.issue18335@psf.upfronthosting.co.za>
2013-07-01 08:35:11ncoghlanlinkissue18335 messages
2013-07-01 08:35:10ncoghlancreate