Re: Delete a instance passed by reference into a method

2007-12-04 Thread hdante
On Dec 4, 11:47 am, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Mon, 2007-12-03 at 18:27 -0800, hdante wrote: > > (note, you don't want to do this, it's a proof of concept) > > > import sys > > > class A(object): > >def __init__(self): > >pass > >def m1(self, x = None): > >

Re: Delete a instance passed by reference into a method

2007-12-04 Thread Carsten Haese
On Mon, 2007-12-03 at 18:27 -0800, hdante wrote: > (note, you don't want to do this, it's a proof of concept) > > import sys > > class A(object): > def __init__(self): > pass > def m1(self, x = None): > if x == None: > x = sys._getfram

Re: Delete a instance passed by reference into a method

2007-12-03 Thread hdante
On Dec 3, 10:02 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Mon, 03 Dec 2007 19:53:20 -0300, sccs cscs <[EMAIL PROTECTED]> escribió: > > > I am very surprising by the Python interpreter behavior : see code > > I initialize a 'A' and a 'B', and i give a B instance reference to the > > in

Re: Delete a instance passed by reference into a method

2007-12-03 Thread Gabriel Genellina
En Mon, 03 Dec 2007 19:53:20 -0300, sccs cscs <[EMAIL PROTECTED]> escribió: > I am very surprising by the Python interpreter behavior : see code > I initialize a 'A' and a 'B', and i give a B instance reference to the > instance A in 'm1' method. I can modify (IN/OUT mode) the 'i' > attribut

Delete a instance passed by reference into a method

2007-12-03 Thread sccs cscs
Hello, I am very surprising by the Python interpreter behavior : see code I initialize a 'A' and a 'B', and i give a B instance reference to the instance A in 'm1' method. I can modify (IN/OUT mode) the 'i' attribute ( aB.i = 10 ) , BUT I CANNOT DELETE "aB" into the fonction m1 ! the code "