Comment on draft PEP for deprecating six builtins

Delaney, Timothy tdelaney at avaya.com
Mon Apr 29 03:32:50 EDT 2002


> From: Raymond Hettinger [mailto:python at rcn.com]
> 
> "Martin v. Löwis" <loewis at informatik.hu-berlin.de> wrote in message
> news:j4elgz9e9a.fsf at informatik.hu-berlin.de...
> > "Raymond Hettinger" <python at rcn.com> writes:
> >
> > >     The module additions would go into Python 2.3.  All six
> > > functions would be left intact and raise deprecation warnings in
> > > Python 2.3 and 2.4.  The six functions would be removed in Python
> > > 2.5 (having allowed two versions and a full year for code 
> updates).
> >
> > I believe the phasing out of the old names should be even slower. In
> > 2.3, introduce the new names; leave the old names intact 
> unchanged. In
> > 2.4 and 2.5, raise DeprecationWarnings; in 2.6, remove them.

Regardless of anything else, Guido has guaranteed no (intentional) code
breakage by default until Python 3.0. So this would mean that, if this PEP
were accepted, the names could not be removed until Python 3.0.

BTW, I'm someone who uses map() and filter() extensively - I find it very
natural to think in tems of those functions. I don't tend to use reduce()
much though. I don't agree that these are natural first candidates for
removal.

I also personally don't think lamdas should be removed. However, if a lambda
exceeds a (BDFL-pronounced) number of opcodes it should be a syntax error
<0.5 wink>. This should reduce most lambdas to one or two expressions.

Tim Delaney





More information about the Python-list mailing list