This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ***** "raw" descriptor not using "property" or property decorators. | |
class Descriptor(object): # simply encapsulates the management of the attribute "_name" | |
def __init__(self): | |
self._name = '' | |
def __get__(self, instance, owner): | |
print "Getting: %s" % self._name | |
return self._name | |
def __set__(self, instance, name): |