Comment on draft PEP for deprecating six builtins

gbreed at cix.compulink.co.uk gbreed at cix.compulink.co.uk
Mon Apr 29 05:35:48 EDT 2002


Raymond Hettinger wrote:

>     Pow() and divmod() are more related to math module functions than 
> any
>     of the built-in functions.  In general, they are rarely used.  
> Because
>     the ** operator is available, the pow() function is rarely called
>     directly.

Hold on there!  The easiest way of doing integer division that works 
across "from __future__ import division" is to use divmod.  Now, as soon 
as that change becomes the default, you're proposing to deprecate it?  
That means it'll get even harder to do consistent integer division across 
2.1 and 2.5.  

The rationale's very brief about the disadvantages of a bloated 
__builtins__.  It isn't like they're reserved words.  We don't need to be 
familiar with them all, because we can always check the library reference 
if we see one we don't know.  Or print the docstring.  There already seem 
to be 114 entries in __builtins__, so removing a mere 5 functions isn't 
going to make it dramatically simpler.

I don't see any benefits to outweigh the pain this is going to cause some 
of us.


                    Graham

       <http://www.microtonal.co.uk/>



More information about the Python-list mailing list