Bugs item #1155938, was opened at 2005-03-03 17:42
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1155938&group_id=5470
Category: Type/class unification
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Steve Alexander (stevea_zope)
Assigned to: Nobody/Anonymous (nobody)
Summary: yield in __init__ causes broken new-style class
Initial Comment:
class Foo(object):
def __init__(self):
print "foo"
raise RuntimeError
yield 23
Foo()
With a classic class, this correctly fails saying
"__init__ must return None". With a new-style class,
the class suite works, and Foo() is called without
reporting an error, but also without printing "foo".
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1155938&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com