operator overloading

Terry Reedy tjreedy at udel.edu
Wed Apr 4 19:50:42 EDT 2007


<sjdevnull at yahoo.com> wrote in message 
news:1175726966.127531.273500 at b75g2000hsg.googlegroups.com...
| FWIW:
| Python 2.5 (r25:51908, Jan 21 2007, 03:10:25)
| [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on HOSTNAME_REDACTED
| Type "help", "copyright", "credits" or "license" for more information.
| >>> class MyInt(int):
| ...     __pow__ = int.__add__
| ...
| >>> i=MyInt(42)
| >>> i**3
| 74088

Thanks.  Bug report submitted
http://sourceforge.net/tracker/index.php?func=detail&aid=1694663&group_id=5470&atid=105470
or
http://python.org/sf/1694663

Terry Jan Reedy






More information about the Python-list mailing list