[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compilation error
From: |
Jan Nieuwenhuizen |
Subject: |
Re: compilation error |
Date: |
Tue, 11 Nov 2008 14:48:24 +0100 |
Op maandag 10-11-2008 om 15:40 uur [tijdzone +0100], schreef Werner
LEMBERG:
Hi Werner,
> Anything new? I can't believe that 2.5.2 compiles the current sources
> just fine, while 2.5 chokes. Theoretically, this shouldn't happen --
> I coulnd't find anything on python.org which documents a syntax change
> w.r.t. class definitions between those two versions.
This is odd indeed. I have mislead you in the way that the fix that
I made was for python-2.4 (not for python-2.5.2). Python 2.5.2 is
fine with both variants, python-2.4 only wants the new, fixed version.
I'm attaching a test file: foo.py. Using that here with both pythons
gives
14:37:11 address@hidden:~
$ python -V
Python 2.5.2
14:37:20 address@hidden:~
$ python -c 'import foo; print foo.Foo, foo.Foo(), foo.Bar, foo.Bar()'
foo.Foo <foo.Foo instance at 0x7ff60533fd88> foo.Bar <foo.Bar instance at
0x7ff60533fd88>
14:37:26 address@hidden:~
$ vc/gub/target/tools/root/usr/bin/python -V
Python 2.4.5
14:37:30 address@hidden:~
$ vc/gub/target/tools/root/usr/bin/python -c 'import foo; print foo.Foo,
foo.Foo(), foo.Bar, foo.Bar()'
Traceback (most recent call last):
File "<string>", line 1, in ?
File "foo.py", line 4
class Bar ():
^
SyntaxError: invalid syntax
[1]14:37:40 address@hidden:~
which is why my fix looked so harmless to me.
Can you put foo.py in your cwd and run:
python -c 'import foo; print foo.Foo, foo.Foo(), foo.Bar, foo.Bar()'
for me?
In the meantime, I'm having a look at suse's python :-)
Greetings,
Jan.
--
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org
foo.py
Description: Text Data
- compilation error, Werner LEMBERG, 2008/11/06
- Re: compilation error, Neil Puttock, 2008/11/06
- Re: compilation error, Jan Nieuwenhuizen, 2008/11/07
- Re: compilation error, Werner LEMBERG, 2008/11/07
- Re: compilation error, Werner LEMBERG, 2008/11/10
- Re: compilation error,
Jan Nieuwenhuizen <=
- Re: compilation error, Werner LEMBERG, 2008/11/11
- Re: compilation error, John Mandereau, 2008/11/11
- Re: compilation error, Werner LEMBERG, 2008/11/11
- Re: compilation error, Reinhold Kainhofer, 2008/11/11
- Re: compilation error, John Mandereau, 2008/11/11
- Re: compilation error, Reinhold Kainhofer, 2008/11/11
- Re: compilation error, John Mandereau, 2008/11/12
- Re: compilation error, John Mandereau, 2008/11/12
- Re: compilation error, Werner LEMBERG, 2008/11/11
- Re: compilation error, John Mandereau, 2008/11/12