What is not objects in Python?
bdesth.quelquechose at free.quelquepart.fr
Sun Sep 28 21:46:13 CEST 2008
process a écrit :
> I have heard some criticism about Python, that it is not fully object-
> What is not an object in Python?
names and statements.
> Why isn't len implemented as a str.len and list.len method instead of
> a len(list) function?
See other answers here about how the len(obj) is implemented. But
anyway: OO and the dotted notation are totally orthogonal. The
message(obj) is by no mean less OO than the obj.method() one - even more
FWIW, since the notion of 'method' is mostly an implementation artifact.
The key conceps in OO are "object" and "message", not "dot" and "method".
More information about the Python-list