Pep 238 Why new // operator (Non-integer Division)

Grant Griffin not.this at seebelow.org
Fri Mar 16 23:51:42 EST 2001


Tim Peters wrote:
> 
> [Gordon Williams]
> > Why do we need a new // operator to do the divide operation.  If
> > we want to do an integer divide with two reals why wont people just
> > use int(a/b).  For
> 
> 1. int() truncates.  Current i/j returns the floor.
> 
> 2. There is no bound on the sizes of i and j; it's very easy to
>    get Python long ints that don't fit in a Python float.

BTW, I guess I'm not the first one to notice that this new operator
looks an awful lot like a C/C++ comment.  So maybe some other symbol
should be used.

Hey, isn't "$" still open? <wink>

just-tryin'-to-make-a-buck-ly y'rs,

=g2
-- 
_____________________________________________________________________

Grant R. Griffin                                       g2 at dspguru.com
Publisher of dspGuru                           http://www.dspguru.com
Iowegian International Corporation            http://www.iowegian.com



More information about the Python-list mailing list