blob: 793903c2338ba5779f0b7c8ac7cfcd4925a47d3a [file] [log] [blame]
Tor Norbye3a2425a2013-11-04 10:16:08 -08001class B(object):
2 __slots__ = ['foo']
3
4b = B()
5b.<warning descr="'B' object has no attribute 'bar'">bar</warning> = 1
6
7class C(B):
8 pass
9
10c = C()
11c.bar = 1
12
13def test_slots_with_dict():
14 class C(object):
15 __slots__ = ['__local', '__name__', '__dict__']
16 a = C()
17 a.foo = 1 #pass