terminological obscurity

Elaine Jackson elainejackson7355 at home.com
Fri May 21 15:42:56 EDT 2004


"Michael Chermside" <mcherm at mcherm.com> wrote in message
news:mailman.145.1085158045.6949.python-list at python.org...
| Elaine Jackson writes:
| > All tuple methods are also list methods, and most list methods are also
tuple
| > methods; among those that are NOT also tuple methods, there are exactly two
| > ('count' and 'index') that do not involve mutation. Is there any special
| reason
| > why they AREN'T also tuple methods?
|
| Yes. Both make sense only if you consider a tuple as a homogeneous
| sequence of items, and that's not what Guido intended it to be
| used for.

####################################################
This invites the question: What DID he intend it to be used for?
Also, like the other respondent, I don't understand what homogeneity has to do
with it.
####################################################

|
| > A question about terminology ('namespace'):
| >
| > >>> prince=tuple()
| > >>> king=[prince]
| > >>> del prince
| >
| > At this point, does the object formerly known as prince belong to the
| > namespace implemented by globals()? More generally, is there a
| > terminological way to distinguish between (1) a function from a set
| > of names into a set of objects, and (2) the aforementioned set of
| > objects?
|
| After executing your code, there exist two objects, one is a tuple
| and the other is a list. The global namespace contains one binding:
| the name "king" is bound to the aforementioned list. The tuple is
| not referred to directly by any name in the global namespace but it
| will not be garbage collected yet because it is referenced by the
| list and cannot be freed until the list itself is freed.
|
| Whether this answers your questions I'm not sure... the questions
| didn't make sense to me.

#############################################################
I'm trying to find out (for a start) whether the term 'global namespace' refers
to (1) the set of bindings, or (2) the set of bindings, together with any
objects that currently exist but do not have "real" names.
#############################################################

|
| > Is there a handy noun that refers to sameness of identity in the same
| > way that 'equality' refers to sameness of value? ('Identicalness' is
| > pretty clumsy, and 'identity' is confusing, since it already has a
| > meaning that is closely related but needs to be kept distinct.)
|
| I've usually heard "identity" used. I don't know of any other synonynms
| to use here.
|
| > Suppose X is a container that contains n items (incidentally, is 'items'
| > the right term?) and i in an integer with 0<=i<=n. Does " X[i] " count
| > as a 'name'?
|
| "items" is a perfectly good term for the things in a list. In common
| usage, "X[i]" is not a name. It is, however, an "L-value" -- a slightly
| related term which (unlike "name") has a fairly precise definition.

#############################################################
Do you know a good place to find a discussion of matters like this?
BTW, thanks for responding.
Peace
#############################################################





More information about the Python-list mailing list