Syntax error after upgrading to Python 2.4
Walter Dörwald
walter at livinglogic.de
Wed Aug 10 14:22:51 EDT 2005
frr at easyjob.net wrote:
> Hi,
>
> After upgrading to 2.4 (from 2.3), I'm getting a weird syntax error:
>
>
>>>>import themes
>
> Traceback (most recent call last):
> File "<interactive input>", line 1, in ?
> File "themes.py", line 564
> font = self.font.makeBlackAndWhite(),
> additive = self.additive,
> ^
> SyntaxError: invalid syntax
>
> The relevant code is:
>
> def makeBlackAndWhite( self ):
>
> return CharStyle( names = self.names,
> basedOn = self.basedOn.makeBlackAndWhite(),
> font = self.font.makeBlackAndWhite(),
> additive = self.additive,
> prefixText = self.prefixText )
>
> This is a method in the CharStyle class which returns a new modified
> instance of CharStyle.
>
> I'm using Windows XP and Python 2.4.1
>
> Any ideas? O:-)
This is probably related to http://www.python.org/sf/1163244. Do you
have a PEP 263 encoding declaration in your file? Can you try
Lib/codecs.py from current CVS?
Bye,
Walter Dörwald
More information about the Python-list
mailing list