Raising objects

Aahz aahz at pythoncraft.com
Fri May 2 15:25:27 EDT 2003


In article <mailman.1051836785.17065.python-list at python.org>,
Steven Taschuk  <staschuk at telusplanet.net> wrote:
>Quoth Aahz:
>> In article <mailman.1051818078.23819.python-list at python.org>,
>> Steven Taschuk  <staschuk at telusplanet.net> wrote:
>>>Quoth Aahz:
>>>>
>>>> This is another reason why new-style classes can't be accepted yet:
>>>> there's no reliable way to tell the distinction between class and
>>>> instance.
>>>
>>>isinstance(x, type)?
>> 
>> But that doesn't tell you whether x is a class.
>
>I'm not sure what you're saying.  In the Brave New World where
>classes and types are the same thing, it seems meaningless to say
>"that's a type, but it's not a class".  Am I missing something?

Yes, you're missing the focus on instances.  Currently, when you raise
an object, it gets accepted as-is if it's an instance, but instantiated
if it's a class.  How do you tell whether something is an instance?
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"In many ways, it's a dull language, borrowing solid old concepts from
many other languages & styles:  boring syntax, unsurprising semantics,
few automatic coercions, etc etc.  But that's one of the things I like
about it."  --Tim Peters on Python, 16 Sep 93




More information about the Python-list mailing list