[issue32911] Doc strings omitted from AST

Serhiy Storchaka report at bugs.python.org
Fri Feb 23 06:29:44 EST 2018


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Note, that getting the location of the dostring already was a pain since in case of multiline string literals CPython saves the location of the last line, and PyPy saves the location of the first line. Getting the location of the specific fragment of the docstring is even larger pain as shown in following examples:

    def f()
        """
        >>> f()
        """

    def f()
        """\
        >>> f()
        """

    def f()
        ""\
        ""\
        ">>> f()"\
        ""\
        ""

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32911>
_______________________________________


More information about the Python-bugs-list mailing list