What is not objects in Python?
george.sakkis at gmail.com
Mon Sep 29 01:45:37 CEST 2008
On Sep 28, 2:29 pm, process <circularf... at gmail.com> wrote:
> I have heard some criticism about Python, that it is not fully object-
That's not a bug, it's a feature ;-)
> Why isn't len implemented as a str.len and list.len method instead of
> a len(list) function?
As Terry Reedy wrote, partly history and partly practicality. There's
no philosophical reason why we write "len(x)" (generic builtin),
"x.append(1)" (method) or "del x[i]" (statement). The latter in
particular is IMHO a design wart; there's no reason for not writing it
More information about the Python-list