Why does python behave so? (removing list items)
Dan Bishop
danb_83 at yahoo.com
Wed Mar 26 18:23:31 EDT 2008
On Mar 26, 5:12 pm, Thomas Dybdahl Ahle <lob... at gmail.com> wrote:
> 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).
The = operator behaves exactly the same way for mutable and immutable
types.
More information about the Python-list
mailing list