Syntax disagreement between IDLE and pydev?

Fabio Zadrozny fabiofz at gmail.com
Mon Mar 30 16:37:12 EDT 2009


>>> 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 doesn't
>>> like this syntax (in my source, column 23 is the asterisk):
>>>
>>> Encountered "*" at line 32, column 23. Was expecting one of: <NEWLINE>
>>> ...     ";" ...     "=" ...
>>>  "+=" ...     "-=" ...     "*=" ...     "/=" ...     "//=" ...     "%="
>>> ...     "&=" ...     "|=" ...     "^=" ...
>>>  "<<=" ...     ">>=" ...     "**=" ...     "lambda" ...     "not" ...
>>>  "+" ...     "-" ...     "~" ...     "(" ...
>>>  "[" ...     "{" ...     "False" ...     "True" ...     "None" ... <NAME>
>>> ...     <HEXNUMBER> ...
>>>  <OCTNUMBER> ...     <DECNUMBER> ...     <FLOAT> ...     <COMPLEX> ...
>>>  "\'" ...     "\"" ...
>>>  "\'\'\'" ...     "\"\"\"" ...     "\'" ...     "\"" ...     "\'\'\'" ...
>>>     "\"\"\"" ...
>>>
>>> Can I assume pydev is wrong or am I missing something?
>>

Tthis 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



More information about the Python-list mailing list