with as a reserved word
BBands
bbands at gmail.com
Mon Jun 11 15:18:17 EDT 2007
On Jun 11, 11:34 am, Fredrik Lundh <fred... at pythonware.com> wrote:
> if you have Python 2.5, you can try it out yourself:
>
> >>> dict(with=1)
> <stdin>:1: Warning: 'with' will become a reserved keyword in Python 2.6
> {'with': 1}
>
> >>> from __future__ import with_statement
> >>> dict(with=1)
> File "<stdin>", line 1
> dict(with=1)
> ^
> SyntaxError: invalid syntax
I see that this change appears to be final.
http://www.python.org/dev/peps/pep-0343/
I don't have an opinion, pro or con, on this PEP, but I'll bet that it
breaks a lot of code.
jab
More information about the Python-list
mailing list