Kaydet (Commit) 80e36750 authored tarafından Guido van Rossum's avatar Guido van Rossum

Add a test for a weird bug I just discovered: a dynamic subclass

doesn't have a __dict__!
üst d3ba10f4
...@@ -613,6 +613,11 @@ def dynamics(): ...@@ -613,6 +613,11 @@ def dynamics():
else: else:
verify(0, "expected AttributeError") verify(0, "expected AttributeError")
verify(a.spam == "spam") verify(a.spam == "spam")
class D(C):
pass
d = D()
d.foo = 1
verify(d.foo == 1)
def errors(): def errors():
if verbose: print "Testing errors..." if verbose: print "Testing errors..."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment