Comment on PEP-0238

Jeff Petkau jpet at eskimo.com
Sun Aug 26 09:53:10 CEST 2001


> But there are dimisishing returns.  Integer division isn't that
> common, ...

I find that awfully hard to believe.

I just scanned through the Python-2.0 source for integer
division.  Out of 1055 .py files, 111 use integer division
and will be need to be fixed for the new division behavior.

I didn't count the exact number that used floating division,
but it was much smaller--maybe 20 files or so. The majority
didn't use any division at all.

There are whole fields of computing where you might never
encounter a floating point number, but I can't imagine any
where you'll never need integer division.

Anyway, since I wasted an hour counting them, here's the
breakage list:

Demo/classes/md5driver.py
Demo/classes/dates.py
Demo/classes/Range.py
Demo/zlib/minigzip.py
Demo/tkinter/guido/electrons.py
Demo/tkinter/guido/hanoi.py
Demo/tkinter/guido/solitaire.py
Demo/tkinter/guido/sortvisu.py
Demo/rpc/xdr.py
Demo/scripts/fact.py (ok if exact results yield integers, eg. 6/3 is 2)
Demo/scripts/ftpstats.py
Demo/scripts/lpwatch.py
Demo/scripts/markov.py
Demo/scripts/pi.py
Demo/scripts/unbirthday.py
Demo/sgi/al/intercom.py
Demo/sgi/al/playaiff.py
Demo/sgi/video/DisplayVideoIn.py
Demo/sgi/video/Dsend.py
Demo/sgi/video/LiveVideoIn.py
Demo/sgi/video/LiveVideoOut.py
Demo/sgi/video/VCR.py
Demo/sgi/video/VFile.py
Demo/sgi/video/Vb.py
Demo/sgi/video/Vcopy.py
Demo/sgi/video/Vfix.py
Demo/sgi/video/Vinfo.py
Demo/sgi/video/Vmkjpeg.py
Demo/sgi/video/Vplay.py
Demo/sgi/video/Vrec.py
Demo/sgi/video/Vrecb.py
Demo/sgi/video/Vunjpeg.py
Demo/sgi/video/aplay.py
Demo/sgi/video/video2rgb.py
Demo/sgi/sv/burstcapt.py
Demo/sgi/sv/contcapt.py
Demo/sgi/sv/rgbgrab.py
Demo/sgi/gl/mclock.py
Demo/sockets/ftp.py
Demo/threads/Generator.py
Doc/tools/buildindex.py
Doc/tools/keywords.py
Doc/ref/reswords.py
Lib/aifc.py
Lib/audiodev.py
Lib/bdb.py
Lib/binhex.py
Lib/bisect.py
Lib/calendar.py
Lib/dumbdbm.py
Lib/ftplib.py
Lib/imaplib.py
Lib/pstats.py
Lib/quopri.py
Lib/repr.py
Lib/rfc822.py
Lib/sndhdr.py
Lib/stringold.py
Lib/sunau.py
Lib/tabnanny.py
Lib/tokenize.py
Lib/uu.py
Lib/wave.py
Lib/whrandom.py
Lib/xdrlib.py
Lib/zipfile.py
Lib/dos-8x3/stringol.py
Lib/dos-8x3/test_aud.py
Lib/dos-8x3/test_aug.py
Lib/dos-8x3/test_bin.py
Lib/dos-8x3/test_exc.py
Lib/dos-8x3/test_gra.py
Lib/dos-8x3/test_img.py
Lib/dos-8x3/test_lon.py
Lib/dos-8x3/test_opc.py
Lib/lib-old/para.py
Lib/lib-old/cmp.py
Lib/lib-old/poly.py
Lib/lib-old/rand.py
Lib/plat-aix3/FCNTL.py
Lib/plat-aix3/TERMIOS.py
Lib/plat-aix4/FCNTL.py
Lib/plat-aix4/TERMIOS.py
Lib/plat-beos5/IN.py
Lib/plat-beos5/SOCKET.py
Lib/plat-irix5/SOCKET.py
Lib/plat-irix5/cddb.py
Lib/plat-irix6/SOCKET.py
Lib/plat-irix6/cddb.py
Lib/plat-linux1/FCNTL.py
Lib/plat-linux2/FCNTL.py
Lib/plat-linux2/IN.py
Lib/plat-linux2/SOCKET.py
Lib/plat-linux2/TERMIOS.py
Lib/plat-sunos5/SOCKET.py
Lib/plat-sunos5/STROPTS.py
Lib/test/pystone.py
Lib/test/sortperf.py
Lib/test/test_audioop.py
Lib/test/test_augassign.py
Lib/test/test_binascii.py
Lib/test/test_imgfile.py
Lib/test/test_long.py
Lib/test/test_mmap.py
Lib/test/test_opcodes.py
Lib/test/test_pty.py
Tools/pynche/ListViewer.py
Tools/scripts/byteyears.py
Tools/scripts/ftpmirror.py
Tools/idle/AutoIndent.py
Tools/idle/EditorWindow.py

--Jeff Petkau (jpet at eskimo.com)






More information about the Python-list mailing list