You're totally right. That's a bug when treating the StarExp. It was creating a name in the Load context when it should be a Store context (which the Pydev Code Analysis made visible).
I've just fixed that -- it's available for svn 2722 (so, please wait for a build with at least that number and check it again with the extensions).
Cheers,
Fabio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
IDLE (3.1a1) accepts
a,*b = re.split(str,pattern)
and does the right thing ('a' gets the first result and 'b' gets
the rest).
pydev configured to use the exact same Python 3.1a1 runtime flags this
as a syntax error:
Encountered "*" at line 32, column 23. Was expecting one of: <NEWLINE> ... ";" ... "=" ...
"+=" ... "-=" ... "*=" ... "/=" ... "//=" ... "%=" ... "&=" ... "|=" ... "^=" ...
"<<=" ... ">>=" ... "**=" ... "lambda" ... "not" ... "+" ... "-" ... "~" ... "(" ...
"[" ... "{" ... "False" ... "True" ... "None" ... <NAME> ... <HEXNUMBER> ...
<OCTNUMBER> ... <DECNUMBER> ... <FLOAT> ... <COMPLEX> ... "\'" ... "\"" ...
"\'\'\'" ... "\"\"\"" ... "\'" ... "\"" ... "\'\'\'" ... "\"\"\"" ...
HOWEVER, I can execute the code without problems.
Should I file a bug?
> Should I file a bug?
No, this has already been fixed for 1.4.5 (provided you set your project as python 3.0). You can get the nightly and check it (as that should be the released version: http://pydev.blogspot.com/2009/03/new-pydev-release-soon-call-for-testers.html )
Cheers,
Fabio
Wow! Thanks for the quick response.
I installed the nightly and it now works.
This is back after installing the pydev-extensions version (also at 1.4.5.2720).
Looks like some fixes didn't make it into the extensions version build?
It seems to work for me... are you sure that the project you're editing is marked with a Python 3.0 grammar?
Cheers,
Fabio
The project grammar is set to Python 3.0
Versions:
Python 3.1a1
pydev 1.4.5.2720
pydev-extensions 1.4.5.2720
This was resolved until I installed pydev-extensions. See also my other thread "pydev extensions - spurious syntax errors"
Are you sure it's the same error?
Cheers,
Fabio
It's on the same line but you're right. The error is now "undefined variable" on "b".
In any event, the code hasn't changed and the error started showing up after installing pydev-extensions.
You're totally right. That's a bug when treating the StarExp. It was creating a name in the Load context when it should be a Store context (which the Pydev Code Analysis made visible).
I've just fixed that -- it's available for svn 2722 (so, please wait for a build with at least that number and check it again with the extensions).
Cheers,
Fabio
The new error still occurred after updating to 2721, but went away after I removed pydev-extensions