PEP0238 lament

Paul Prescod paulp at ActiveState.com
Tue Jul 24 08:22:56 EDT 2001


Duncan Grisby wrote:
> 
>...
> 
> I return to my question. Suppose Python 2.2 is released with this
> __future__ division. Now suppose I must maintain some code which can
> run on Python 2.0, 2.1 and 2.2, which needs integer division. What am
> I to do? 

I think divmod()[0]. (or maybe I've missed something there)

Another option would be for Guido to add a declaration that wouldn't
break old versions of Python (i.e. a comment) that you could add to your
module.
-- 
Take a recipe. Leave a recipe.  
Python Cookbook!  http://www.ActiveState.com/pythoncookbook




More information about the Python-list mailing list