Is it possible do define your own function which can be used as a non-alphabetic function sign?
I'm just curious whether it is possible.
I don't want to change some existing function like __eq__
or __gt__
.
For example '***' sign would do this computation on Int
: x***x = x^2^2
. So I would define this function and then I could use it this way:
for x in xrange(3):
print x***x
- 0
- 1
- 16
- 81