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/2013-October/129359.html below:

[Python-Dev] Python startup time

[Python-Dev] Python startup time [Python-Dev] Python startup timeEric Snow ericsnowcurrently at gmail.com
Thu Oct 10 02:18:20 CEST 2013
On Wed, Oct 9, 2013 at 8:30 AM, Christian Heimes <christian at python.org> wrote:
> The os module imports MutableMapping from collections.abc. That import
> adds collections, collections.abc and eight more modules. I'm not sure
> if we can do anything about it, though.

Well, that depends on how much we want to eliminate those 10 imports.
:)  Both environ and environb could be turned into lazy wrappers
around an _Environ-created-when-needed.  If we used a custom module
type for os [1], then adding descriptors for the two attributes is a
piece of cake.  As it is, with a little metaclass magic (or even with
explicit wrapping of the various dunder methods), we could drop those
10 imports from startup.

-eric

[1] This probably wouldn't be a great idea considering that
undoubtedly some code depends on "type(os) is types.ModuleType".
More information about the Python-Dev mailing list

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