4 ms·
In this article, some listed operators are: operator.length_hint operator.itemgetter operator.countOf What's the (historical?) reason the operator
by blumomo 5y ago
In this article, some listed operators are:
operator.length_hint
operator.itemgetter
operator.countOf
What's the (historical?) reason the operator module uses different casing standards?
- O5vYtytb 5y agoThe operator module is very old: https://github.com/python/cpython/blob/ea4d3f0804a3aad5afaa66a91012325e2067a0af/Modules/operator.c https://github.com/python/cpython/blob/ea4d3f0804a3aad5afaa6... PEP8 was introduced in 2001: https://www.python.org/dev/peps/pep-0008/ https://www.python.org/dev/peps/pep-0008/
- wirrbel 5y agotypically in CPython its just a sign that the code is fairly old, or at times (as with the unittest module), that an API was ported from CamlCase language at least partially.