PEP0238 lament

Stephen Horne steve at lurking.demon.co.uk
Tue Jul 24 00:43:26 EDT 2001


On Tue, 24 Jul 2001 06:11:36 +0300, Kirill Simonov
<kirill at xyz.donetsk.ua> wrote:

>Hello,
>
>Please tell me, how to write a correct program that uses integer
>division and must work on Python 2.1 and Python 2.4.

There is a simple workaround to keep in mind for new software, and for
software that you get get hold of to change in advance. It ain't
pretty though...

  def intdiv (a, b) :
    return divmod (a, b) [0]

Not too bad where it's an option.




More information about the Python-list mailing list