updade from Atlas repo
This commit is contained in:
1 parent
c518bf851e
commit
8a330d822b
120 files changed
+2190
-1184
No files matched your search
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
class Foo:
|
||||
@property
|
||||
def bar(self):
|
||||
return self._bar
|
||||
|
||||
@bar.setter
|
||||
def bar(self, value):
|
||||
self._bar = value
|
||||
|
||||
def __setattr__(self, name, value):
|
||||
print(f'setting {name!r} to {value!r}')
|
||||
super().__setattr__(name, value)
|
||||
|
||||
o = Foo()
|
||||
o.bar = 8
|
||||
print(o.bar)
|
||||
print(o._bar)
|
||||
Reference in new issue
Block a user