brad <[EMAIL PROTECTED]> writes: > Will len(a_string) become a_string.len()? I was just reading > > http://docs.python.org/dev/3.0/whatsnew/3.0.html > > One of the criticisms of Python compared to other OO languages is that > it isn't OO enough or as OO as others or that it is inconsistent. And > little things such as this seem to support those arguments. Not that > it matters really... just seems that classes with methods used in a > more consistent manner would be more appropriate in an OO > langauage. Is there a reason that len cannot be a method? > > a_string.lower() makes sense, as does a_string.split(), > a_string.strip()... why not a_string.len()?
I wonder why people always complain about `len` function but never about `iter` or `pprint.pprint`? :) And to answer the question. In OO programming generic functions are no less important than classes and objects. Regards, Rob -- http://mail.python.org/mailman/listinfo/python-list