Message294706
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. |
|
Date |
User |
Action |
Args |
2017-05-29 17:41:19 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, vstinner, methane, myint |
2017-05-29 17:41:19 | serhiy.storchaka | set | messageid: <1496079679.18.0.299040699054.issue30497@psf.upfronthosting.co.za> |
2017-05-29 17:41:19 | serhiy.storchaka | link | issue30497 messages |
2017-05-29 17:41:18 | serhiy.storchaka | create | |
|