Serhiy Storchaka added the comment:

Even if the line number of a docstring is known, it is not easy to determine 
the line number corresponding to the particular line in a docstring if it 
contains backslashes following by newline.

'''foo
bar
'''

and

'''\
foo
bar
'''

are equal strings, but the lines 'bar' have different offsets from the start of 
the strings.

The only robust method was parsing the source code starting from the start of a 
docstring. Now you just need to start parsing from the start of the 
function/class.

----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30497>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to