Comment on PEP-0238

Greg Ewing greg at cosc.canterbury.ac.nz
Mon Jul 9 23:32:43 EDT 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)[0].

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:	  
http://www.cosc.canterbury.ac.nz/~greg



More information about the Python-list mailing list