kuroko/test/testNonDataDescriptor.krk

15 lines
195 B
Python
Raw Permalink Normal View History

class NonDataDescriptor:
def __get__(self, obj, objtype=None):
return 42
class Foo:
a = NonDataDescriptor()
def test(F):
print(F.a)
F.a = 7
print(F.a)
test(Foo())