Mastering Python

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Wed Mar 21 16:40:51 EDT 2007


Paul McGuire a écrit :
(snip)
> - Don't forget the ()'s.  To invoke a method on an object, you must
> include the parens.  This wont do anything:
>   a = "some string"
>   a = a.lower

It will actually do something: rebind name 'a' to the method lower() of 
the string previously binded to 'a'

(snip)



More information about the Python-list mailing list