Third Draft: Pep for Deprecating Builtins

Alex Martelli aleax at aleax.it
Tue Apr 30 12:47:25 EDT 2002


On Tuesday 30 April 2002 06:18 pm, Jeff Epler wrote:
> On Tue, Apr 30, 2002 at 08:32:34AM +0000, Alex Martelli wrote:
> > So, types.ClassType COULD stay around "forever" from my POV, even long
> > after the default metaclass has become type -- at worst, the way to
> > enable the alternative metaclass as the default one would be 2 lines at
> > module scope:
> >
> > import types
> > __metaclass__ = types.ClassType
>
> Why not
>     from __past__ import old_style_classes

*THIS* one would be pretty easy to implement at almost no cost, if so
wished when and if the default __metaclass__ becomes the buit-in
'type'.  I don't particularly care for the style, but <shrug> -0.

> this would extend well to
>     from __past__ import integer_division
>     from __past__ import no_yield_token

These would be somewhat messier, requiring the interpreter to carry
around old code forever, I think (offhand I'm not sure what it would take
to implement the 'no_yield_token' one, actually).  No doubt the purpose
of "from __past__" is indeed to enable such further additions, which is
part of what makes me -0 on it.  But it IS still something of a <shrug>.


Alex





More information about the Python-list mailing list