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 | nnorwitz |
|---|---|
| Recipients | nnorwitz |
| Date | 2008年03月25日.06:15:43 |
| SpamBayes Score | 0.3876456 |
| Marked as misclassified | No |
| Message-id | <1206425748.68.0.392615437966.issue2477@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
This is a patch that modifies the parser to allow getting the future import flags into the AST. There are 2 approaches that are embedded within the patch. Both approaches can be seen in Python/pythonrun.c. 1) update_flags_from_node() - this pulls the __future__ import out of the parser nodes. It is not complete, but should give an idea of how this approach could be generalized. 2) Add APIS such as PyParser_ParseFileFlagsEx that returns the flags from the parser The first approach is somewhat fragile and kinda breaks encapsulation. It's nice that all the changes are internal and localized. The second approach is probably a better long term solution, but adds even more APIs where there are already too many. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年03月25日 06:15:49 | nnorwitz | set | spambayes_score: 0.387646 -> 0.3876456 recipients: + nnorwitz |
| 2008年03月25日 06:15:48 | nnorwitz | set | spambayes_score: 0.387646 -> 0.387646 messageid: <1206425748.68.0.392615437966.issue2477@psf.upfronthosting.co.za> |
| 2008年03月25日 06:15:47 | nnorwitz | link | issue2477 messages |
| 2008年03月25日 06:15:46 | nnorwitz | create | |