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 2010年06月24日 11:46 by bhy, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg108507 - (view) | Author: Haoyu Bai (bhy) | Date: 2010年06月24日 11:46 | |
"from . import *" is valid syntax in CPython (both 2.6 and py3k) but in the language reference it is not allowed: http://docs.python.org/dev/py3k/reference/simple_stmts.html#the-import-statement |
|||
| msg108539 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2010年06月24日 18:21 | |
That's because while it is syntactically allowed, it is semantically disallowed. The grammar rules shown in the docs is a generalization of the actual grammar used to build the parser so that we can take shortcuts with it to simply not have rules that will pass the parser but fail in the compiler. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:02 | admin | set | github: 53314 |
| 2010年06月24日 18:21:05 | brett.cannon | set | status: open -> closed priority: normal -> low components: + Documentation, - Interpreter Core assignee: brett.cannon nosy: + brett.cannon messages: + msg108539 resolution: wont fix |
| 2010年06月24日 11:46:42 | bhy | create | |