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/030656.html below:

[Python-Dev] New universal import mechanism ( Re: [Python-checkins] python/dist/src/Python import.c,2.210,2.211)

[Python-Dev] New universal import mechanism ( Re: [Python-checkins] python/dist/src/Python import.c,2.210,2.211)Guido van Rossum guido@python.org
Tue, 03 Dec 2002 03:59:05 -0500
> My users want extension modules to be able to control how their
> attributes are imported when using "import *". In particular,
> Boost.Python includes a kind of multimethod facility, and some of my
> users would like it if
> 
>       from bpl_extension import *
> 
> caused multimethod definitions in bpl_extension to be /merged/ into
> the current module, rather than replacing any multimethod bindings
> with the same name in the current module.

Alas, the current import hooking mechanisms don't allow control over
this (the interpretation of * is hardcoded).  Feel free to suggest an
API and/or implementation of a hook for that, after reading how it's
done now.  The crucial code is import_all_from() in ceval.c.

--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