What steps will reproduce the problem?
1. a=object()
2. print(-a)
3.
What is the expected output?
if __neg__ is defined for the object, it should return a value
(ie, the above should be translated to a.__neg__()) instead of how it is
translated:
Number(-1).__mul__(a)
Number.__mul__ would have to "know" how to work with each type of object, even
newly defined ones.
What do you see instead?
Please use labels and text to provide additional information.
Original issue reported on code.google.com by billy.earney@gmail.com on 10 Mar 2013 at 12:59
Original issue reported on code.google.com by
billy.earney@gmail.com
on 10 Mar 2013 at 12:59