Using '__mul__' within a class

Terry Reedy tjreedy at
Sat Sep 24 20:28:28 CEST 2005

"Gerard Flanagan" <grflanagan at> wrote in message 
news:1127576164.489710.291280 at
>    def __mul__( self, other ):
>    def Square( self ):
>        self *= self

Among the other reasons cited, I believe that 'op=' maps to a different 
special method than 'op'.  __imul__? or something?  do check.


More information about the Python-list mailing list