What is not objects in Python?
tino at wildenhain.de
Sun Sep 28 20:41:59 CEST 2008
> I have heard some criticism about Python, that it is not fully object-
Don't listen to the voices... ;)
> What is not an object in Python?
> Why isn't len implemented as a str.len and list.len method instead of
> a len(list) function?
So you also want to write 1+2 in the form of 1.add(2) ?
(Yes, in python you can do that, as well as "hello".__len__() works
even (1).__add__(2) works.)
Maybe its just that python don't want to waste good names for methods :-)
So as said above in some other thread, python supports OO but does not
force to write OO.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3241 bytes
Desc: S/MIME Cryptographic Signature
More information about the Python-list