Humpty Dumpty (was Re: Lists and Tuples)

Arthur ajsiegel at optonline.com
Mon Dec 8 15:04:52 CET 2003


On 7 Dec 2003 11:02:38 -0500, aahz at pythoncraft.com (Aahz) wrote:

>In article <mailman.190.1070806215.16879.python-list at python.org>,
>Fredrik Lundh <fredrik at pythonware.com> wrote:
>>Arthur wrote:
>>>
>>> "Type" is not normally an ambiguous word.
>>
>>really?  in my experience, "type" and "object" are about as ambiguous
>>as words can get, especially when you're talking about Python.

I actually see the point also, with direct relevance to Lists and
Tuple tutorial semantics, to the extent that I am confused whether
instances of different classes are of the same "type".

I have considered no. By inheriting from object and creating something
new from it I am creating a custom type. I thought.  I think this
impression comes from my little experinece with other languages.  And
since the way I use lists are to group instances of different classes,
which may have nothing in common other than a single method of the
same name, I have considered my lists to be of heterogenous type.
Which is why I have been confused by the language to describe the
prototypical use of lists.

Art

>
>Hrm.  I see your point, but I also think it's fairly easy to get people
>to agree on definitions for "type" and "object" within the context of a
>discussion.  From my POV, the ambiguity comes from layering on additional
>meanings beyond that supported by the C API.





More information about the Python-list mailing list