I started with the "How-To Guide for Descriptors" by Raymond Hettinger
http://users.rcn.com/python/download/Descriptor.htm
It is one of several docs on the "New-style Classes" page at python.org
http://www.python.org/doc/newstyle/
--
http://mail.python.org/mailman/listinfo/python-list
>>> print property.__doc__
property(fget=None, fset=None, fdel=None, doc=None) -> property
attribute
fget is a function to be used for getting an attribute value, and
likewise
fset is a function for setting, and fdel a function for del'ing, an
attribute. Typical use is to define a managed attribu
class person(object):
def _get_age(self):
return self.__age
age = property(_get_age) # a read-only property
def _get_name(self):
return self.__name
def _set_name(self, value):
self.__name = value
name = property(_get_name, _set_name)
--
http://mail.pyt
Hi,
I want to know how we can write Properties in Pyhton.Any one knows
good doc for this one?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list