Why does python behave so? (removing list items)
Bruno Desthuilliers
bruno.42.desthuilliers at wtf.websiteburo.oops.com
Thu Mar 27 05:40:13 EDT 2008
Thomas Dybdahl Ahle a écrit :
> On Wed, 2008-03-26 at 23:04 +0100, Michał Bentkowski wrote:
>> Why does python create a reference here, not just copy the variable?
>
> Python, like most other oo languages, will always make references for =,
> unless you work on native types (numbers and strings).
>
There's nothing like a "native type" in Python, and numbers and strings
are ordinary objects. Python will always use references, period.
More information about the Python-list
mailing list