[issue27119] `compile` doesn't compile into an AST object as specified

2020-11-15 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: We've added a reference to the compiler flags into the compile(), see issue 40484 for details. -- resolution: -> duplicate stage: -> resolved status: open -> closed versions: +Python 3.10 -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8

[issue27119] `compile` doesn't compile into an AST object as specified

2019-12-01 Thread Batuhan
Change by Batuhan : -- nosy: +BTaskaya versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___ ___

[issue27119] `compile` doesn't compile into an AST object as specified

2016-05-25 Thread Franklin? Lee
Franklin? Lee added the comment: > What you're looking for is in the 2nd paragraph of the ast docs: Oh. I considered that, but then compile's docs say: The optional arguments flags and dont_inherit control which future statements (see PEP 236) affect the compilation of source.

[issue27119] `compile` doesn't compile into an AST object as specified

2016-05-25 Thread Eryk Sun
Eryk Sun added the comment: What you're looking for is in the 2nd paragraph of the ast docs: An abstract syntax tree can be generated by passing ast.PyCF_ONLY_AST as a flag to the compile() built-in function, or using the parse() helper provided in this module. The result will be

[issue27119] `compile` doesn't compile into an AST object as specified

2016-05-24 Thread Franklin? Lee
New submission from Franklin? Lee: >From `compile`'s doc: "Compile the source into a code or AST object." The docs don't say how to compile into an AST object with `compile`, though. As it says later: "If you want to parse Python code into its AST representation, see ast.parse()." I c