> obj1 = c1(1)
> 
> obj1 + 10 # this works just fine
> 
  10 + obj1 # throws exception

>             Q. What do I have to do to make the following line work?
> 
>                         10 + obj1


http://docs.python.org/ref/numeric-types.html

You want to read the section on __radd__ (and it's other 
__r[whatever]__ variants)

-tkc



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to