Catching errors in attribute names at assigment
Heather Coppersmith
me at privacy.net
Mon Jun 21 16:21:48 EDT 2004
On Mon, 21 Jun 2004 22:01:31 +0200,
Pawel Kraszewski <pawel_Kraszewski at wp.pl> wrote:
> If you say __all__=["a","b","c"], those 3 attributes are the
> only ones valid for field/method accessing. So class.a=5 is ok,
> but class.d=5 raises exception.
ITYM __slots__ instead of __all__.
Regards,
Heather
--
Heather Coppersmith
That's not right; that's not even wrong. -- Wolfgang Pauli
More information about the Python-list
mailing list