[Python-Dev] Python 3 design principles

Charles Cazabon python at discworld.dyndns.org
Wed Aug 31 22:44:39 CEST 2005

Oren Tirosh <oren.tirosh at gmail.com> wrote:
> Not all proposed changes remove redundancy or add completely new
> things. Some of them just change the way certain things must be done.
> For example:
> *  Moving compile, id, intern to sys
> *  Replacing print with write/writeln
> And possibly the biggest change:
> *  Reorganize the standard library to not be as shallow
> I'm between +0 and -1 on these. I don't find them enough of an
> improvement to break this "common subset" behavior. It's not quite the
> same as strict backward compatibility and I find it worthwhile to try
> to keep it.
> Writing programs that run on both 2.x and 3 may require ugly
> version-dependent tricks like:
> try:
>     compile
> except NameError:
>     from sys import compile

Perhaps py3k could have a py2compat module.  Importing it could have the
effect of (for instance) putting compile, id, and intern into the global
namespace, making print an alias for writeln, alias the standard library
namespace, ... ?

Charles Cazabon                           <python at discworld.dyndns.org>
GPL'ed software available at:               http://pyropus.ca/software/

More information about the Python-Dev mailing list