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/1999-September/000954.html below:

[Python-Dev] Relative Package Imports

[Python-Dev] Relative Package Imports [Python-Dev] Relative Package ImportsGreg Stein gstein@lyra.org
Thu, 16 Sep 1999 04:57:20 -0700
Guido van Rossum wrote:
>...
> What breakage?  I think __ is a bit too hard to fix easily with a
> smart editor.  And believe me, at some point *someone* is going to
> need to rip out your custom importer because it interferes with *his*
> custom importer, and he'll choose to replace all your __ imports with
> absolute package names, rather than trying to add the __ feature to
> his importer.

This is an aspect of Python's singular import hook. imputil is designed
to allow for multiple Importers to be present and to work in harmony. As
long as each Importer can identify that a particular import is part of
its namespace (e.g. HTTPImporter recognizes _http_... as one of its
own), then no conflicts will arise and everything will be hunky-dory.

btw, it might be nice to allow a string to the import statement. I'd
much rather say: import "http://www.lyra.org/greg/python/qp_xml.py"

Cheers,
-g

--
Greg Stein, http://www.lyra.org/



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