This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients ashwch, benrg, docs@python, ezio.melotti, r.david.murray
Date 2013-01-24.04:59:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1359003597.91.0.0119699438017.issue16701@psf.upfronthosting.co.za>
In-reply-to
Content
To clarify, with "depends on the implementation" I meant the way a particular class is implemented (i.e. a class might decide to return a new object even if it's mutable).
The behavior of built-in types is well defined and should be the same across all the Python implementations.
Regarding the comment about immutable types, it's something specific to CPython (I don't remember the specific details though, so I might be wrong), and somewhat similar to:
>>> 'a'*20 is 'a'*20
True
>>> 'a'*25 is 'a'*25
False
This shouldn't be a problem though, so if you e.g. do "x = y = immutableobj;  y += 1", 'x' should never be affected.
History
Date User Action Args
2013-01-24 04:59:57ezio.melottisetrecipients: + ezio.melotti, r.david.murray, docs@python, benrg, ashwch
2013-01-24 04:59:57ezio.melottisetmessageid: <1359003597.91.0.0119699438017.issue16701@psf.upfronthosting.co.za>
2013-01-24 04:59:57ezio.melottilinkissue16701 messages
2013-01-24 04:59:57ezio.melotticreate