On Wed, Jul 4, 2018 at 3:53 AM, INADA Naoki email@example.com wrote:
But if it happens, I'm -1 on functools and collections. They are used very much. Every Python tool import them regardless how much of their contents are used.
really? collections? what for? I'm guessing namedtuple and maybe deque.
But collections already has 9 classes (well, things) in it so we'd be adding a bit less than 10% more to it.
what is the concern? import time, memory?
In either case, it seems like the wrong driver for deciding where to put new things.
If you really want to add it in collections, I suggests
from collections.groupdict import GroupDict.
Perhaps the stdlib should have a deeper namespaces in general -- if that is established as a policy, then this could be the first thing to follow that policy. But I thought "flat is better than nested" -- sigh.
So maybe we need to bite the bullet and solve the problem at another level:
1) if, say, namedtuple has gotten very popular, maybe it should move to builtins.
2) Whatever happened to the proposals to make it easier to lazy-load stuff in modules? If that gets implemented, then we can speed up startup in general, and not have to be too worried about adding "too much" to a module because one thing in it is common use.