On Wed, Oct 9, 2013 at 8:30 AM, Christian Heimes <christ...@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". _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com