Steven D'Aprano <st...@remove-this-cybersource.com.au> writes:
> Not accidental, but people complain if you use slots for the purpose of 
> prohibiting attribute creation. They say "That's not what __slots__ was 
> designed for!". That's okay though, computers were designed for breaking 
> Germany ciphers and calculating the trajectory of cannon-shells, but 
> they're not the only things we use computers for these days.

It's hard to figure out from the docs exactly what slots is supposed
to do:

  http://docs.python.org/reference/datamodel.html#id3

I don't think it's good style to rely on accidental, undocumented
characteristics of some language feature.  But, I may start using
slots for some of the stuff I'm doing, just to reduce space
consumption and keep more instances around, which is what it's really
intended for.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to