[issue25886] ast module is combining string literals that are concatenated with plus operator

2015-12-16 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: duplicate -> not a bug ___ Python tracker ___ ___

[issue25886] ast module is combining string literals that are concatenated with plus operator

2015-12-16 Thread SilentGhost
SilentGhost added the comment: Hm, I'm going to close this as duplicate since a commenter in your previous issue clearly stated: "I don't think the AST module makes any guarantee about being able to reproduce the original source". -- nosy: +SilentGhost, benjamin.peterson,

[issue25886] ast module is combining string literals that are concatenated with plus operator

2015-12-16 Thread STINNER Victor
STINNER Victor added the comment: "The fact that ast combines strings and does not maintain the original syntax of the document means that original syntax information is lost and a writer walking the abstract syntax tree is unable to reproduce the original syntax of the document." You should

[issue25886] ast module is combining string literals that are concatenated with plus operator

2015-12-16 Thread Myron Walker
Myron Walker added the comment: My thought on this is that a syntax tree needs to accurately represent parsed syntax of the code. Two strings being concatenated contain syntax information that is different from a single string. "Hello" + " World" Is not the same syntax as: "Hello

[issue25886] ast module is combining string literals that are concatenated with plus operator

2015-12-16 Thread R. David Murray
R. David Murray added the comment: By the way, if you want to talk about enhancing the AST module to be more useful to your use cases, the python-ideas mailing list would be the right place to raise the topic (you might want to look for earlier relevant discussions first, I'm pretty sure

[issue25886] ast module is combining string literals that are concatenated with plus operator

2015-12-16 Thread Myron Walker
New submission from Myron Walker: ast module is combining string literals that are concatenated with plus operator into a single string in the parsestrplus module rather than maintaining the true syntax tree of the original document. The fact that ast combines strings and does not maintain

[issue25886] ast module is combining string literals that are concatenated with plus operator

2015-12-16 Thread R. David Murray
R. David Murray added the comment: Also note that this probably mirrors the behavior of the actual compiler (I haven't checked). -- nosy: +r.david.murray ___ Python tracker