An object is an instance (or not)?

André Roberge andre.roberge at gmail.com
Tue Jan 27 22:38:12 CET 2015


On Tuesday, 27 January 2015 17:06:50 UTC-4, Mario Figueiredo  wrote:
> In article <80a9f882-6b13-45a7-b514-8c47b3a4c37d at googlegroups.com>, 
> andre.roberge at gmail.com says...
> > 
> > You keep writing "an object is not an instance", making statements
> > such as "the terminology keeps indicating that in Python an object is 
> > an instance" and yet, none of the examples you show from Python
> > (tracebacks or repr outputs) include the word "instance".   
> 
> I think you misread my argument. Look at the first example on my post, 
> or follow the discussion on "__bases__ misleading error message" here on 
> the newsgroups.


> 
> That error message has me start that thread arguing that the error is 
> misleading because the Sub object does have the __bases__ attribute. 
> It's the Sub instance object that does not have it.
> 

To use the word object to describe an instance is perfectly appropriate. Your claims imply the the opposite is happening.

> Some of the answers that were given argued that in Python object = 
> instance.
> 
> > Yet
> > **you** claim that "Python" states that objects are instances ....
> 
> That is no my claim. I said that much. You should probably read my post 
> more carefully.

I read your post carefully: not once did I see an output from Python using the word "instance".


>From your post:

==== Python's output ======
    AttributeError: 'Sub' object has no attribute '__bases__' 
=============================
Python uses the word "object, not "instance".



++++++ your words +++++++++++

Here's another example where the terminology keeps indicating that in 
Python an object is an instance: 
++++++++++++++++++++++++++++++

==========Python's output ===============
    <__main__.Sub object at 0x02631690> 
=======================================
Python uses the word "object, not "instance", contrary to what you wrote.



+++++++++++ your words ++++++++++++++

The problem is that an object isn't always an instance. 
+++++++++++++++++++++++++++++++++++++


++++++++++++ your words ++++++++++++

What I'm arguing thought is that 
error messages in Python cannot become the source of new terminology. 
++++++++++++++++++++++++++++++++

Not a single output from Python uses the word instance.

It is appropriate to refer to an instance as an object.  It might not be appropriate to refer to an object as an instance ... but Python does not do so as your explicit examples demonstrate, and contrary to your claim.

A.R.





More information about the Python-list mailing list