A RetroSearch Logo

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

Search Query:

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

[Python-Dev] New and Improved Import Hooks

[Python-Dev] New and Improved Import HooksGuido van Rossum guido@python.org
Thu, 05 Dec 2002 08:27:29 -0500
> > > > Why don't you care about the backwards incompatibilities?
> > > 
> > > Because it's addressed by using a str subclass.
> > 
> > Which strikes *me* as an ugly hack. :-(
> 
> True, but you can't have your cake and eat it, too: either we implement an
> elaborate scheme of registering handlers for sys.path items, or we keep it
> simple and do our best to avoid breakage.
> 
> Jim Ahlstrom & Paul Moore's patch implement an elaborate scheme which isn't
> exposed to Python, and it adds a fair amount of spaghetti code to an already
> messy part of Python. I'm still a -1 on it.

I know. :-)

> Allowing arbitrary objects on sys.path is simple to explain, document and
> implement, solves the zip import problem and offers a clean high level import
> hook scheme. How much better can it get?

I fear that the requirement that all handlers are str subclasses
raises the bar for writing a handler too much.  But maybe that's not a
problem.  (It's not like writing import hooks is currently a piece of
cake. :-)

So I hereby change my position to -0 on str subclass handlers, which
means you can go ahead.

--Guido van Rossum (home page: http://www.python.org/~guido/)



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