15 lines
195 B
Python
15 lines
195 B
Python
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())
|
|
|