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 2012年01月19日 00:45 by Jim.Jewett, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg151595 - (view) | Author: Jim Jewett (Jim.Jewett) * (Python triager) | Date: 2012年01月19日 00:45 | |
http://docs.python.org/reference/lexical_analysis.html Changed in version 2.5: Both as and with are only recognized when the with_statement future feature has been enabled. It will always be enabled in Python 2.6. See section The with statement for details. Note that using as and with as identifiers will always issue a warning, even when the with_statement future directive is not in effect. That was reasonable wording for 2.5 itself, but at this point, I think it would be simpler to add a Changed in version 2.6 entry. Perhaps: Changed in version 2.5: Using as or with as identifiers triggers a warning. Using them as statements requires the with_statement future feature. Changed in Python 2.6: as and with became full keywords. |
|||
| msg151723 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年01月21日 05:33 | |
New changeset c84b39c18963 by Terry Jan Reedy in branch '2.7': Issue13820 as and with really became keywords in 2.6. http://hg.python.org/cpython/rev/c84b39c18963 |
|||
| msg151724 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2012年01月21日 05:35 | |
I verified that 'as' and 'with' are in the 2.6 keyword.kwlist. http://svn.python.org/projects/python/branches/release26-maint/Lib/keyword.py. I verified that they work as keywords in 2.7. http://svn.python.org/projects/python/branches/release26-maint/Doc/reference/compound_stmts.rst says with is always enabled in 2.6. I fixed whitespace error in 74551 (117d58fc6e8d) |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:25 | admin | set | github: 58028 |
| 2012年01月21日 05:35:57 | terry.reedy | set | status: open -> closed assignee: docs@python -> terry.reedy nosy: + terry.reedy messages: + msg151724 resolution: fixed stage: resolved |
| 2012年01月21日 05:33:42 | python-dev | set | nosy:
+ python-dev messages: + msg151723 |
| 2012年01月19日 00:45:56 | Jim.Jewett | create | |