capitalization of library class names

前端 未结 3 1397
生来不讨喜
生来不讨喜 2021-01-19 21:50

Why do collection.defaultdict and collection.OrderedDict have different capitalizations?

Is there some subtle difference that I should be a

3条回答
  •  失恋的感觉
    2021-01-19 22:35

    defaultdict is written in C and pep8 don't apply , in the other hand OrderDict is written in python,

    you can read C code norm for the C implementation of Python here : PEP 7

    reference : source code python2.7

    defaultdict  : Modules/_collectionsmodule.c
    OrderDict : Lib/collections.py
    

提交回复
热议问题