Files
openide/python/testData/inspections/PyUnresolvedReferencesInspection3K/objectNewAttributes.py
2013-09-12 18:21:29 +04:00

10 lines
228 B
Python

class C(object):
def __new__(cls):
self = object.__new__(cls)
self.foo = 1
return self
x = C()
print(x.foo)
print(x.<warning descr="Unresolved attribute reference 'bar' for class 'C'">bar</warning>)