Newbie: Functions and class
Shu-Hsien Sheu
sheu at bu.edu
Fri Oct 31 10:30:58 EST 2003
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
More information about the Python-list
mailing list