What is not objects in Python?

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Mon Sep 29 15:02:44 CEST 2008

George Sakkis:
> I don't see the same value in creating a distinction between methods
> and builtin functions unless the latter are truly generic (and even
> then I wouldn't mind having them as methods of the base object class,
> e.g. object.type()). Having a builtin len(x) delegate to x.__len__()
> seems harder to justify.

I have shown few usage examples of the len() one of the posts in this
thread. Can you take a look at them and show how you can better
rewrite them without a len function?


More information about the Python-list mailing list