Safe Psyco

Delaney, Timothy tdelaney at avaya.com
Mon Oct 14 00:56:48 EDT 2002


> From: aahz at pythoncraft.com [mailto:aahz at pythoncraft.com]
> 
> That only works if you do *ALL* your bindings for your application in
> one spot.  The problem is that you only get ImportError once per
> application invocation.

That would be completely broken behaviour IMO.

try:
    import abc
except ImportError:
    print 'Error 1'

try:
    import abc
except ImportError:
    print 'Error 2'

Python 2.2.1, 2.1.1, 2.0.1, 1.5.2, Jython 2.1.2
---------- Run ----------
Error 1
Error 2

Nope - looks like it works as expected.

Tim Delaney




More information about the Python-list mailing list