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 kayhayen
Recipients benjamin.peterson, kayhayen
Date 2010-08-26.18:08:17
SpamBayes Score 7.1239725e-10
Marked as misclassified No
Message-id <1282846100.54.0.786984229278.issue9690@psf.upfronthosting.co.za>
In-reply-to
Content
Hello Benjamin,

thank you for the response. What do you mean with there is "nothing we can do about it". Is it not possible to add another field indicating the prefix given to a literal?

BTW: I believe raw strings are also no longer recognizable. Fortunately I do not need to do that, but look here:

>>> ast.dump( ast.parse( r"""a = r'\n'""" ) )
"Module(body=[Assign(targets=[Name(id='a', ctx=Store())], value=Str(s='\\\\n'))])"

Currently the only work around to not being able to tell if there was a b"" in the source code, is to open the file and check myself. And getting the actual raw string is not feasible at all.

So why not at least have an "ast" module that allows to decide without ambiguity what the user said. I agree that raw strings can be solved before the AST and it doesn't matter much. But I don't think it's acceptable that CPython can execute the code correctly, but using the AST nodes, there is no way to tell.

I thought they share code?

Yours,
Kay
History
Date User Action Args
2010-08-26 18:08:20kayhayensetrecipients: + kayhayen, benjamin.peterson
2010-08-26 18:08:20kayhayensetmessageid: <1282846100.54.0.786984229278.issue9690@psf.upfronthosting.co.za>
2010-08-26 18:08:18kayhayenlinkissue9690 messages
2010-08-26 18:08:17kayhayencreate