Thoughts on new vs traditional idioms
Peter Otten
__peter__ at web.de
Tue Mar 2 09:48:19 EST 2004
Delaney, Timothy C (Timothy) wrote:
[unrelated code snipped]
>> Assuming all immutable classes are "smart enough":
[... to reuse an instance of the exact class passed to their copy
constructor - to use C++ terminology for lack of any better]
> That's a *very* big assumption - one I would never make.
Do you have a class with immutable instances handy where the following
assertion fails?
assert immutableObj.__class__(immutableObj) is immutableObj
Peter
More information about the Python-list
mailing list