Making immutable instances

bonono at gmail.com bonono at gmail.com
Thu Dec 1 00:01:26 EST 2005


Mike Meyer wrote:
> bonono at gmail.com writes:
> > Well, in this case, would it be simple for the OP that if he wants to
> > disallow this attaching additional things, just use __slot__.
>
> That's *documented* as an implementation-dependent behavior. Using it
> to get that effect is abuse of the feature, and may well quit working
> in the future.
>
I don't see it mention as implementation-dependent behaviour on this
page, and this is supposed to be "(for language lawyers)".

http://www.python.org/doc/2.4.2/ref/slots.html

If it really is implementation detail but not a binding to the language
feature, I think someone need to change the doc, at least make it more
clear on this page.




More information about the Python-list mailing list