In article <mailman.18193.1422402146.18130.python-l...@python.org>, ros...@gmail.com says... > > On Wed, Jan 28, 2015 at 10:22 AM, Ned Batchelder <n...@nedbatchelder.com> > wrote: > > I don't know what the difference is between "object" and "instance". An > > object is an instance of a class. The two words are interchangeable as far > > as I know. > > My understanding is that "instance" is meaningless unless followed by > "of". That is to say, 123.45 is an object, and it is an instance *of* > the 'float' class. Everything in Python is an instance *of something*, > so in a sense, you can say that everything is an instance, but that's > like saying that everything has a color. Sure it does, but you need to > be more specific. >
In programming languages in which class definitions aren't first-class objects, the terms are in fact used interchangeably. And rightly so, because an object is in fact always an instance of some class. Python and a few other languages implement class definitions as first- class objects. In this case, the distinction between an object and an instance is actually an implementation detail and comes with its own semantics. This is why I object to the notion that in Python object = instance. -- https://mail.python.org/mailman/listinfo/python-list