[Python-3000] Will Py3K be friendlier to optimization opportunities?

Collin Winter collinw at gmail.com
Wed Aug 29 23:02:39 CEST 2007


On 8/29/07, skip at pobox.com <skip at pobox.com> wrote:
[snip]
> I certainly wasn't expecting something to be available for review now or in
> the near future.  I was actually mostly thinking about language syntax and
> semantics when I started writing that email.  I think those are more likely
> to be frozen early on in the 3.0 development cycle.  I seem to recall some
> message(s) on python-dev a long time ago about maybe restricting outside
> modification of a module's globals, e.g.:
>
>     import a
>     a.x = 1     # proposed as an error?
>
> which would have allowed easier optimization of global access.

When thinking about these kinds of optimizations and restrictions,
keep in mind their effect on testing. For example, I work on code that
makes use of the ability to tinker with another module's view of
os.path in order to simulate error conditions that would otherwise be
hard to test. If you wanted to hide this kind of restriction behind an
-O flag, that would be one thing, but having it on by default seems
like a bad idea.

Collin Winter


More information about the Python-3000 mailing list