process wrote:
What is not an object in Python?

Everything that is not part of Python's syntax is an object, including all string and number types, classes, metaclasses, functions, models, code and more. It's technically not possible to have something like e.g. an int that isn't an object.

Why isn't len implemented as a str.len and list.len method instead of
a len(list) function?

Because readability is more important than purity. By the way len(egg) is just syntactic sugar for egg.__len__() with some extra checks.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to