Re: Newbie: Functions and class
From: Shu-Hsien Sheu (sheu_at_bu.edu)
Date: 10/31/03
- Next message: Ken Godee: "Re: Overwriting / reassigning instance / garbage collection?"
- Previous message: Jimmy Retzlaff: "RE: popen[2-4] does not work with parameters inside quotes"
- In reply to: KefX: "Re: Newbie: Functions and class"
- Next in thread: Alex Martelli: "Re: Newbie: Functions and class"
- Reply: Alex Martelli: "Re: Newbie: Functions and class"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 31 Oct 2003 10:30:58 -0500 To: python-list@python.org
Dear Kef,
I can totally understand the following. However, I cannot see clearly
how this is similiar to the self assignment?
>If you don't understand, it's the same reason this doesn't work:
>x = 2
>y = x
>x = 3
>if x == y:
> print 'Hello world'
> # Why doesn't this print?
>
>
Dear Alex,
I think I can see your point. So, we can gerenally say that, only
instances of a class can have assignments; Class name are only a
"reference" thing and doesn't have any "exact" values bind to it. Sorry
my wording might be wrong, but it's the best that I could think of.
thanks!
-shuhsien
- Next message: Ken Godee: "Re: Overwriting / reassigning instance / garbage collection?"
- Previous message: Jimmy Retzlaff: "RE: popen[2-4] does not work with parameters inside quotes"
- In reply to: KefX: "Re: Newbie: Functions and class"
- Next in thread: Alex Martelli: "Re: Newbie: Functions and class"
- Reply: Alex Martelli: "Re: Newbie: Functions and class"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]