Why does python behave so? (removing list items)
pavlovevidence at gmail.com
Thu Mar 27 04:45:47 CET 2008
On Mar 26, 11:30 pm, Steven D'Aprano <st... at REMOVE-THIS-
> On Wed, 26 Mar 2008 23:12:27 +0100, Thomas Dybdahl Ahle 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).
> *Including* numbers and strings.
Playing Devil's advocate: By "native types" the poster could have
meant native types in those "most other oo languages". For instance,
it would be kind of true in Java (for numbers only).
He probably didn't, though, and the idea that most oo languages use
references is questionable.
More information about the Python-list