[Python-Dev] Syntax error in python2.6

Jesse Noller jnoller at gmail.com
Mon Jul 21 13:25:55 CEST 2008


Because as of 2.6 the 'with' word is now part of the with statement,  
see pep 343.


On Jul 21, 2008, at 7:13 AM, "Bristow Thankachan" <bristow.thankachan at gmail.com 
 > wrote:

> Hi everybody,
>
> During the porting of Zope2 to Python2.6, I am stuck with a syntax  
> error in the module AccessControl, which is given below.
>
> def reorder(s, with=None, without=()):
>                            ^
> SyntaxError: invalid syntax
>
> in line 56 of /home/zope/ztrunk26/lib/python/RestrictedPython/ 
> Utilities.py.
> The same code when run in python2.4 and python2.5 didn't give any  
> syntax errors. Can anybody suggest  the reason for this syntax error  
> in python2.6.
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/jnoller%40gmail.com


More information about the Python-Dev mailing list