Third Draft: Pep for Deprecating Builtins
Jeff Epler
jepler at unpythonic.net
Tue Apr 30 12:18:28 EDT 2002
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 would extend well to
from __past__ import integer_division
from __past__ import no_yield_token
>
We could have one version warn about old code, and permit new behavior
by importing from the __future__. Then, in the next version, code could
still get the old behavior by 'from __past__ import'. Finally, in
Python 3.0, the old behavior could be removed altogether, like the
vestigal appendix or a tomcat's testicles.
Jeff
More information about the Python-list
mailing list