pita73837 / lagrange

Automatically exported from code.google.com/p/lagrange
0 stars 0 forks source link

Python 2.6 keyword 'as' used as variable name #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Running under python 2.6 produces the error

  File "/work/lagrange/ratemodel.py", line 273
    as = Ancsplit(self, dist, split, weight=weight)
     ^
SyntaxError: invalid syntax

This is because 'as' is a keyword in Python 2.6. 

In the current snapshot, there is a file decmodel_mp.py which has the same
problem.

Original issue reported on code.google.com by loris.be...@gmail.com on 20 Jul 2009 at 2:20

GoogleCodeExporter commented 9 years ago
I a new user of lagrange and I was trying to play a little bit with the example 
files
(psychotria_demo.lagrange.py) in the website and I have the same problem. How 
can I
solve this problem and have lagrange working?

Original comment by nyctice...@gmail.com on 27 Jul 2009 at 12:34

GoogleCodeExporter commented 9 years ago
Just open the file with a text editor, search for and replace all occurences of 
'as'
with something else like 'anc_split'.

Original comment by loris.be...@gmail.com on 22 Sep 2009 at 5:11

GoogleCodeExporter commented 9 years ago

Original comment by blackrim on 1 Sep 2010 at 3:11

GoogleCodeExporter commented 9 years ago
that is correct. this is fixed in the newer version, but moving to c++ (faster 
code, so no longer an issue)

Original comment by blackrim on 1 Sep 2010 at 3:11