[ZCM] [ZC] 1809/ 3 Comment "return with wrong keywords results in wrong error message"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Tue Aug 2 05:58:21 EDT 2005


Issue #1809 Update (Comment) "return with wrong keywords results in wrong error message"
 Status Rejected, Zope/bug low
To followup, visit:
  http://www.zope.org/Collectors/Zope/1809

==============================================================
= Comment - Entry #3 by alzhimer on Aug 2, 2005 5:57 am

may be related: it's possible to create a ZMI PythonScript with a Parameter List of 

  a='hallo', b

without getting a SyntaxError, which really should be

SyntaxError: non-default argument follows default argument
________________________________________
= Reject - Entry #2 by ajung on Aug 2, 2005 5:19 am

 Status: Pending => Rejected

test(a=something, b)
is not even allowed in Python (wrong parameter ordering).


________________________________________
= Request - Entry #1 by Anonymous User on Jun 13, 2005 11:22 am

A Python Script of this form:
return test(a=a, b)

results in the error message:
 	
'return' outside function (Script (Python), line 1)

instead of:

non-keyword arg after keyword arg (Script (Python), line 1)

This influences the parsing of the whole script. If such a buggy line is present anywhere in the Script, the first return found gives the error message "'return' outside function".
==============================================================



More information about the Zope-Collector-Monitor mailing list