import a modified module

David MacQuigg dmq at gain.com
Mon Mar 29 14:19:17 EST 2004


On 27 Mar 2004 21:12:24 GMT, mjackson at alumni.caltech.edu (Mark
Jackson) wrote:

>David MacQuigg <dmq at gain.com> writes:
>> On 26 Mar 2004 20:03:45 GMT, mjackson at alumni.caltech.edu (Mark
>> Jackson) wrote:
>
>> I don't understand why the term "references" is suboptimal.  A module
>> M1 has a namespace, which is detailed in a dictionary M1.__dict__.
>> This dictionary contains _references_ to objects in memory (not the
>> objects themselves).  What terminology would be better?
>
>Binding (of names to objects).  To quote Aahz,
>
>> I'm saving up time for a longer response to Donn, but here's a short
>> one: I'm not at all opposed to using "reference" and indeed I use it all
>> the time.  I just think that using "binding" is preferable in most cases
>> because it gets people out of the pointer mindset.

I wouldn't use the term "pointer" because of the confusion with C
pointers, but there is not *any* term which some students will
initially confuse with other terms they have learned.  ( Some objects
are "bound", some are not.)  And this is _Python_ terminalogy.

For an introductory class in Python, I'm still preferring the term
"reference" in the context I have illustrated above.  It's a general
word without strong contradictory associations.  All names have
references to real objects in memory.  The reference for any object is
revealed by the id() function.

-- Dave




More information about the Python-list mailing list