Re: Confused by Method(function) of a module and method of aclass/instance

2006-03-06 Thread Sullivan WxPyQtKinter
Yes, I checked out that I have already run "from string import *". So the lower() means string.lower() function. However, something else came out just now: >>>instr='a' >>>instr.join('b') 'b' >>>instr.lower() 'A' >>>instr 'a' Both as the method of the type str, join never use the instr instance ob

Re: Confused by Method(function) of a module and method of aclass/instance

2006-03-06 Thread Fredrik Lundh
"Sullivan WxPyQtKinter" <[EMAIL PROTECTED]> wrote: > In python, these expression seems yields the same result: > > inputstring='ABC' > > print inputstring.lower() > print lower(inputstring) > print string.lower(inputstring) > > result: > abc > abc > abc I get >>> inputstring="ABC" >>> print inpu