A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-December/031116.html below:

[Python-Dev] new import hooks & zip import

[Python-Dev] new import hooks & zip import [Python-Dev] new import hooks & zip importJust van Rossum just@letterror.com
Thu, 12 Dec 2002 20:25:13 +0100
[Paul Moore]
> > Actually, I'd say that "I can't handle this" should *always* be
> > signalled by an exception (Only One Way To Do It), but rather than
> > reusing ImportError, that should be a new exception type (I don't
> > know what to call it though - ImportHandlerError?) That way, you
> > don't risk masking real exceptions.

[GvR]
> OK, point taken.

If we should add a new exception, would it be ok for it to live in the imp
module? It would be a fairly specialized exception so it's kindof a shame to
pollute the builtin namespace for it.

ImportHookError?

zipimporter currently raises ZipImportError in this case, but that's a subclass
of ImportError... (I'm actually -0 on adding a new exception; I don't think
reusing ImportError is all that bad.)

Just



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4