[ python-Bugs-1183468 ] check for return/yield outside function is
wrong
SourceForge.net
noreply at sourceforge.net
Sun Apr 17 00:05:20 CEST 2005
Bugs item #1183468, was opened at 2005-04-14 20:53
Message generated for change (Comment added) made by logistix
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1183468&group_id=5470
Category: Parser/Compiler
Group: AST
Status: Open
Resolution: None
Priority: 5
Submitted By: Neil Schemenauer (nascheme)
Assigned to: Nobody/Anonymous (nobody)
Summary: check for return/yield outside function is wrong
Initial Comment:
The code currently uses c_nestlevel. That's incorrect
as this example code demonstrates:
>>> class A:
... return
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Error when calling the metaclass bases
PyClass_New: dict must be a dictionary
Not sure what the fix is but I wanted to file a bug so
it doesn't get forgotten.
----------------------------------------------------------------------
Comment By: logistix (logistix)
Date: 2005-04-16 17:05
Message:
Logged In: YES
user_id=699438
Patch 1184418 is (sortof) posted. SF is giving me grief when
I try to do it as a real attachment though.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1183468&group_id=5470
More information about the Python-bugs-list
mailing list