[Zope-dev] property type

Tim McLaughlin tim@siteworx.com
Thu, 06 Feb 2003 08:21:41 -0500


This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigA35EF666DFD7D895EB3C61F2
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

According to docs and testing (in the interpreter) I can make a 
read-only calculated attribute using property() (I know that setters do 
not work w/ non-new-style classes).  So I tried the following:

class CMixin:
   def getter(self):
     return 'test'
   prop = property(getter)

and when I try to mix in this object w/ a Folder object, the instance 
returns <property object at 0x8b45edc> for the 'prop' attribute.  Is 
this an issue with pickling or something else?

Cheers,
Tim
-- 
Tim McLaughlin
Chief Technology Officer
Siteworx, Inc... Set your site on the future!
703.390.5421

--------------enigA35EF666DFD7D895EB3C61F2
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+QmFlrKTrBObaNBERAhv1AKCSuVMSvziUhyv3KMpN8Csfba2X0ACbB6oY
BUptSaFp8ImAI63svce3ypo=
=f08/
-----END PGP SIGNATURE-----

--------------enigA35EF666DFD7D895EB3C61F2--