> class Demo(object): > @def_property > class test: > """This is a test property""" > def get(self): > print "Getting attribute on instance" > def set(self, value): > print "Setting attribute on instance" > def delete(self): > print "Deleting attribute on instance" The code looks like "self" refers to a test instance, but it will actually refer to a Demo instance. This is quite misleading.
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