Anthony Sottile added the comment:

pypy seems to have this right (though I don't know enough about their internals 
to know if cpython can benefit from their patch)

$ venvpypy/bin/pythonPython 2.7.10 (3260adbeba4a, Apr 19 2016, 17:42:20)
[PyPy 5.1.0 with GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>> import ast, astpretty
>>>> astpretty.pprint(ast.parse('"""\n"""'))
Module(
    body=[
        Expr(
            lineno=1,
            col_offset=0,
            value=Str(lineno=1, col_offset=0, s='\n'),
        ),
    ],
)

----------
nosy: +Anthony Sottile

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

Reply via email to