[issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods

Martin v. Löwis report at bugs.python.org
Fri Aug 27 16:09:22 CEST 2010


Martin v. Löwis <martin at v.loewis.de> added the comment:

> I feel this breaks most people's expectations...

I think you are quite mistaken in this assumption. Sure, object references are difficult to grasp at first, but they are a highly useful concept, and follow very simple, systematic principles - you just need to "get" it once.

> result of a modification to an object that is immutable

Objects that are immutable *cannot* be modified - that this the very definition of "immutable". It seems that your understanding of Python still doesn't match its semantics.

However, Python really can't adjust to whatever your current understanding is: most people (dealing with it) already have the right understanding.

So closing this as "won't fix".

----------
nosy: +loewis
resolution:  -> wont fix
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9702>
_______________________________________


More information about the Python-bugs-list mailing list