Why the mixture of lowercase and UpperCamelCase?
namedtuple
deque
Counter
OrderedDict
defaultdict
Why collections instead
The collections module follows the PEP 8 Style Guide:
Modules should have short, all-lowercase names.
This is why it's collections
Almost without exception, class names use the CapWords convention.
This is why it's Counter and OrderedDict, because they are both classes:
>>> collections.Counter
>>> collections.OrderedDict
namedtuple is a function, so it does not follow the style guide mentioned above. deque and defaultdicts are types, so they also do not:
>>> collections.deque
>>> collections.namedtuple
>>> collections.defaultdict
Note: With Python 3.5, defaultdict and deque are now classes too:
>>> import collections
>>> collections.Counter
>>> collections.OrderedDict
>>> collections.defaultdict
>>> collections.deque
I assume they kept defaultdict and deque lowercase for backwards compatibility. I would not imagine they'd make such a drastic name change for the sake of a style guide.