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.
Created on 2011年05月29日 17:23 by eric.araujo, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| document-pycf-only-ast.diff | eric.araujo, 2011年05月29日 17:23 | |||
| Messages (9) | |||
|---|---|---|---|
| msg137203 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2011年05月29日 17:23 | |
Title says it all. |
|||
| msg137205 - (view) | Author: Benjamin Peterson (benjamin.peterson) * (Python committer) | Date: 2011年05月29日 17:29 | |
Use of PyCF_ONLY_AST be superseded by ast.parse. |
|||
| msg137270 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2011年05月30日 13:32 | |
Okay. I’ll make another patch to remove mentions of this flag then. |
|||
| msg137590 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2011年06月03日 21:30 | |
This is a bit tricky. It may be superseded, but it is still there, is possible used in older code, has not been deprecated as far as I know, and appears in dir(ast). The two current mentions of PyCF_ONLY_AST in ast doc are: "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." (near the top ) "ast.parse(source, filename='<unknown>', mode='exec') Parse the source into an AST node. Equivalent to compile(source, filename, mode, ast.PyCF_ONLY_AST)." The first mention is referred to in the compile entry: "compile(source, filename, mode, flags=0, dont_inherit=False, optimize=-1) Compile the source into a code or AST object. Code objects can be executed by exec() or eval(). source can either be a string or an AST object. Refer to the ast module documentation for information on how to work with AST objects." In my view, it is adequately documented now, should not be undocumented, and should not be given more prominence either. So I recommend closing this. Hmm. It should be indexed for anyone reading existing code. If possible, I would have the index point to the first current sentence, which also mentions .parse() as an alternative. |
|||
| msg138330 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2011年06月14日 15:26 | |
Another bug requesting documentation for a compiler flag exposed by a module: #1612012. > If possible, I would have the index point to the first current > sentence, which also mentions .parse() as an alternative. This should be possible: http://sphinx.pocoo.org/markup/para.html#directive-index |
|||
| msg150946 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年01月09日 16:13 | |
FWIW this issue was also noted by Terry in #4118, but there was no reply. |
|||
| msg185018 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2013年03月22日 23:41 | |
PyCF_ONLY_AST is defined in pythonrun.h and referenced in bltinmodule.c, Python-ast.c and pythonrun.c. Should it be documented or not? |
|||
| msg185119 - (view) | Author: Ramchandra Apte (Ramchandra Apte) * | Date: 2013年03月24日 06:42 | |
> In my view, it is adequately documented now, should not be undocumented, and should not be given more prominence either. So I recommend closing this. +1 |
|||
| msg185178 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2013年03月25日 02:46 | |
No problem. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:17 | admin | set | github: 56416 |
| 2013年03月25日 02:46:54 | eric.araujo | set | status: open -> closed resolution: rejected messages: + msg185178 stage: patch review -> resolved |
| 2013年03月24日 06:42:00 | Ramchandra Apte | set | nosy:
+ Ramchandra Apte messages: + msg185119 |
| 2013年03月22日 23:41:39 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg185018 |
| 2012年01月09日 16:13:23 | eric.araujo | set | messages: + msg150946 |
| 2011年06月14日 15:26:37 | eric.araujo | set | messages: + msg138330 |
| 2011年06月03日 21:30:24 | terry.reedy | set | nosy:
+ terry.reedy messages: + msg137590 |
| 2011年05月30日 13:32:57 | eric.araujo | set | messages:
+ msg137270 versions: - Python 3.1 |
| 2011年05月29日 17:29:11 | benjamin.peterson | set | priority: normal -> low nosy: + benjamin.peterson messages: + msg137205 |
| 2011年05月29日 17:23:49 | eric.araujo | create | |