Comment on PEP-0238
greg at cosc.canterbury.ac.nz
Tue Jul 10 05:32:43 CEST 2001
Guido van Rossum wrote:
> I just discovered that we don't need to add a new operator overloading
> name for the div and mod operations: classes already look for a
> __divmod__ method to overload divmod(), and we should naturally define
> div(x, y) (or x div y) as divmod(x, y).
That sounds suspiciously similar to the argument that
we don't need __eq__, __le__ etc. because we can just
as well funnel them all through __cmp__...
Greg Ewing, Computer Science Dept, University of Canterbury,
Christchurch, New Zealand
To get my email address, please visit my web page:
More information about the Python-list