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

skip at pobox.com skip at pobox.com
Thu Aug 30 04:19:46 CEST 2007


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

You can achieve these sorts of effects by assigning an object to
sys.modules[modulename].

Skip



More information about the Python-3000 mailing list