__slots__ , private members and properties
Bjorn Pettersen
BPettersen at NAREX.com
Sun Mar 9 04:05:45 CET 2003
> From: Cristian Echeverria [mailto:cer at vtr.net]
>
> Is the atached code a good way to work with __slots__,
> private members
> and properties.
> In the examples all the members are read-only and the code works, but
> I'am not sure this is the way to work with this features.
Seems like an awful lot of boilerplate code. Take a look at the
__readonly__ receipe in the Python Cookbook for a better solution
(http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/157768).
-- bjorn
More information about the Python-list
mailing list