self argument

Gerrit Holl gerrit at nl.linux.org
Mon Feb 28 07:20:36 EST 2000


On Mon, Feb 28, 2000 at 01:04:59PM +0100, Gregoire Welraeds wrote:
> In reply to the message of James Logajan sent on Feb 26 (see below) :
> 
> In my newbiness ignorance, I'm asking what is the difference between t and
> self.x. Aren't they both member of the class C ?

No, only 'self.x' is. 't' is only in the local namespace; it gets
destroyed as soon as the function (method, in this case) is ready.

regards,
Gerrit.

-- 
-----BEGIN GEEK CODE BLOCK----- http://www.geekcode.com
Version: 3.12
GCS dpu s-:-- a14 C++++>$ UL++ P--- L+++ E--- W++ N o? K? w--- !O !M !V PS+ PE?
Y? PGP-- t- 5? X? R- tv- b+(++) DI D+ G++ !e !r !y
-----END GEEK CODE BLOCK-----




More information about the Python-list mailing list