> Using the new syntax along with special metaclass support, properties > and static and class methods could be declared like this:: > > class MyClass(object): > def class myClassMethod(cls): . . . > def static myStaticMethod(): . . . This syntax is clear, explicit, and attractive. > def get myProperty(self): . . . > def set myProperty(self, value): . . . This ibe doesn't extend as cleanly: def del myProperty(self, value): "Oops, del is a keyword" def doc myProperty ... ? what goes here Also, can two properties share a getter or setter as they can now? x = property(notifyOneWay, setx) y = propetry(notifyOneWay, sety) Raymond Hettinger ################################################################# ################################################################# ################################################################# ##### ##### ##### ################################################################# ################################################################# #################################################################
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4