commit | 66c1a525e08fda439ddda3b6371236df1398cfd5 | [log] [tgz] |
---|---|---|
author | Tim Peters <tim.peters@gmail.com> | Mon Sep 24 21:17:50 2001 +0000 |
committer | Tim Peters <tim.peters@gmail.com> | Mon Sep 24 21:17:50 2001 +0000 |
tree | 9ac8e6d2fda99e406a40b281ae315d686a570c53 | |
parent | 30c484916988862608e4efdfa8f8aa911e4cc0c3 [diff] |
Make properties discoverable from Python: - property() now takes 4 keyword arguments: fget, fset, fdel, doc. Note that the real purpose of the 'f' prefix is to make fdel fit in ('del' is a keyword, so can't used as a keyword argument name). - These map to visible readonly attributes 'fget', 'fset', 'fdel', and '__doc__' in the property object. - fget/fset/fdel weren't discoverable from Python before. - __doc__ is new, and allows to associate a docstring with a property.