Some of the elements in the collections module seem to be uppercase, some other not. Is there a specific rationale behind it?
1 回答
5
根据这个reddit评论
用python编写的所有类都是大写的。
所有基于 C 代码的类型都较低。[像原始人一样]
namedtuple是一个函数,因此遵循函数的命名约定。deque并且defaultdict是类型,(C);Counter并且OrderedDict是类,(Python)。
于 2015-12-09T01:46:30.260 回答