[Python-Dev] Re: [Python-checkins] python/dist/src/Python bltinmodule.c, 2.292.10.1, 2.292.10.2
Greg Ewing
greg at cosc.canterbury.ac.nz
Sun Oct 26 22:22:26 EST 2003
More information about the Python-Dev mailing list
Sun Oct 26 22:22:26 EST 2003
- Previous message: [Python-Dev] Re: [Python-checkins] python/dist/src/Python bltinmodule.c, 2.292.10.1, 2.292.10.2
- Next message: [Python-Dev] the "3*x works w/o __rmul__" bug
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Alex Martelli <aleaxit at yahoo.com>: > Exactly the same underlying reason as a bug I just opened on > SF: if x is an instance of a class X having __mul__ but not > __rmul__, 3*x works (just like x*3) but 3.0*x raises TypeError Seems to me the bug there is not giving X an __rmul__ method and yet expecting y*x to work at all. The fact that it happens to work in some cases is an accident that should not be relied upon. Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg at cosc.canterbury.ac.nz +--------------------------------------+
- Previous message: [Python-Dev] Re: [Python-checkins] python/dist/src/Python bltinmodule.c, 2.292.10.1, 2.292.10.2
- Next message: [Python-Dev] the "3*x works w/o __rmul__" bug
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list