Why does python behave so? (removing list items)

castironpi at gmail.com castironpi at gmail.com
Wed Mar 26 21:06:04 EDT 2008


On Mar 26, 5:28 pm, bearophileH... at lycos.com wrote:
> Micha³ Bentkowski:
>
> > Why does python create a reference here, not just copy the variable?
>
> I think to increase performance, in memory used and running time (and
> to have a very uniform way of managing objects).
>
> Bye,
> bearophile

A variable is a name-value pair.  It's undefined outside of one-to-
ones therein.  You have two names.  Do they refer to the same object.
There is no such thing as the "primitive contents" of -any- standard
object.



More information about the Python-list mailing list