B
brad
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()?
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()?