Passing arguments to function - (The fundamentals are confusingme)

Terry Reedy tjreedy at udel.edu
Wed Aug 10 00:37:48 EDT 2005


"Christopher Subich" <spam.csubich+block at block.subich.spam.com> wrote in 
message news:0S5Ke.5236$3p.2192 at bignews3.bellsouth.net...
> Dennis Lee Bieber wrote:
>> In a more simplistic view, I'd reverse the phrasing... The name
>> "x" is assigned to the object "y" (implying it is no longer attached to
>> whatever used to have the name)

I agree that this is the more useful way to see it.  I intentionally said 
'useful' rather than 'correct' since I consider the former to be the way to 
judge viewpoints.  And I base the usefullness view on an informal (and yes, 
unscientific) mental tabulation of newbie confusions posted to c.l.p over 
several years.  But better data could revise my judgment..

> No, because that'd imply that the object 'y' somehow keeps track of the
> names assigned to it,

I disagree with your implication and see it the other way.  To me, 'the 
object  is bound to a name' implies that the object can only be bound to 
one name while the name could have many objects bound to it, which is the 
opposite of the case.

Analogy: in an elementary school, students are assigned to (bound to) a 
room.  The name=>room binding is recorded in a list (the 'namespace', 
alphabetical for lookup of names) in the principal's office.  The rooms do 
not have to have a list of the students assigned to them, even though one 
could be derived from the master list, as one could

Put another way: 'the name is bound' implies pretty clearly that the name 
is acted up, and it is that acting upon that makes the object a (new) 
property of the name.  Nothing need be done to the object itself.  This is 
even clearer if 'bound' is expanded to 'associated with object-fetch 
information'.  So 'x = y' means "associated name 'x' with the object-fetch 
information that name 'y' is currently associated with."

>The object is the property of the name, not vice versa.

I agree, and see the binding of the name (to the object, as explained 
above) as that which sets the property.

Terry J. Reedy







More information about the Python-list mailing list