Supply condition in function call

Steven D'Aprano steve+comp.lang.python at pearwood.info
Fri Mar 27 00:34:53 EDT 2015


On Fri, 27 Mar 2015 01:21 pm, Rustom Mody wrote:

> Anyway my point is that in python (after 2.2??) saying something is an
> object is a bit of a tautology -- ie verbiage without information.


Er, it's *always* been a tautology. Every value in Python is an object,
including classes, and that has been always the case.

However, just because it's a tautology doesn't mean it isn't useful to know.
(Tautologies are also known as *facts* and knowing facts is usually a good
thing.) For the majority of programming languages, it is not the case that
all values are objects, and not all people reading the documentation should
be expected to know that this applies to Python.

Besides, "object" in Python circles is ambiguous. It can also mean:

* the Python type "object";

* an instance of the Python type "object";

* any non-class instance of any old-style class (Python 2 only) 
  or type (new-style class);

* "boxed" values in object-oriented languages;

and possibly others as well. Personally, I dislike using object as a synonym
for "instance", as it fails to account for classes which are instances. But
other than that, all those meanings are valid and have to be distinguished
from context.





-- 
Steven




More information about the Python-list mailing list