[IPython-user] Embedded IPython and -pylab

Inigo Aldazabal Mensa inigo_aldazabal@ehu...
Mon Sep 15 05:28:39 CDT 2008


El Lunes, 15 de Septiembre de 2008 12:04, Ville M. Vainio escribió:
> On Mon, Sep 15, 2008 at 11:56 AM, Inigo Aldazabal Mensa
>
> <inigo_aldazabal@ehu.es> wrote:
> > mmm... while writting this I checked a bit more and it seems to be
> > related on how python itself treats variable aliasing.
> >
> >>>> a=1
> >>>> b=a
> >>>> b is a
> >
> > True
> >
> >>>> b=2
> >>>> b is a
> >
> > False
> >
> >>>> a
> >
> > 1
> >
> >
> > I think I understand what happens, but I'll have to think about it a
> > bit more.
>
> Yes, you will see that if you edit *mutable* data types (e.g. append
> no list), you will see the same value on both sides.

I see... thanks again for the pointers. I'll have a look at it.

Inigo


More information about the IPython-user mailing list