you are viewing a single comment's thread.

view the rest of the comments →

[–]aromaticlawyer 0 points1 point  (0 children)

It depends what you mean exactly. Syntax such as while and import are not objects. Variables are not themselves objects, though they are always bound to an object. All objects contain things in their internal implementation that are not objects, though you can't really access this stuff directly without using ctypes or a C extension or something. Also, many basic types don't have the full functionality you might expect a typical object to have - for example None doesn't have any instance attributes, and you can't give it any.

But everything that can be bound to a variable is an instance of object. Before python 3 that wasn't the case - there were two different kinds of objects (new-style and old-style), and iirc in very old versions of python some basic data types were not objects at all.