J
Jean-S?bastien Bolduc
I'm afraid this is a silly question, to which I know the answer
already. But let me ask anyway...
In Python, is there a way to modify a builtin type's methods? for
instance, modifying int.__add__ to behave as multiplication, I would
obtain 2+5 == 10. I emphasize that I don't want to modify the Python
source, but change the types behaviour _from within Python_.
Help would be appreciated!
already. But let me ask anyway...
In Python, is there a way to modify a builtin type's methods? for
instance, modifying int.__add__ to behave as multiplication, I would
obtain 2+5 == 10. I emphasize that I don't want to modify the Python
source, but change the types behaviour _from within Python_.
Help would be appreciated!