Re: Using '__mul__' within a class




"Gerard Flanagan" <grflanagan@xxxxxxxxxxx> wrote in message
news:1127576164.489710.291280@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> 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.

tjr



.



Relevant Pages