"Sullivan WxPyQtKinter" wrote: > More confusing things came out to me: > >>>str().lower() > '' #well, this is > understandable. > >>>str.lower(str(),'A') > 'a' > > How do you explain this result?
I get: >>> str.lower(str(), 'A') Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: lower() takes no arguments (1 given) if you meant to write >>> str.lower('A') 'a' it's because "str" is the class that implements methods for the "str" type, and, for an instance I of the class C: I.method() and C.method(I) are, in general, the same thing in Python </F> -- http://mail.python.org/mailman/listinfo/python-list