Files
openide/python/testData/inspections/PyDunderSlotsInspection/inheritedClassAttrAssignmentAndInheritedSlots.py
2017-05-13 00:17:45 +03:00

14 lines
157 B
Python

class B(object):
attr = 'baz'
__slots__ = ['foo', 'bar']
class C(B):
pass
C.attr = 'spam'
print(C.attr)
c = C()
c.attr = 'spam'
print(c.attr)