7 ms·
It's not a secret at all, PEP 8 even acknowledges it - see http://www.python.org/dev/peps/pep-0008/#naming-conventions http://www.python.org/dev/peps/pep-0008/#
by hannibalhorn 14y ago
It's not a secret at all, PEP 8 even acknowledges it - see http://www.python.org/dev/peps/pep-0008/#naming-conventions http://www.python.org/dev/peps/pep-0008/#naming-conventions - and of course attention to backwards compatibility is a good thing.
- usually constants are capitalized, but math.pi and math.e aren't
- the Decimal class has methods like is_nan(), and generally puts underscores in the method names, while the math package provides methods like isnan()
- even within the same package, you have cases like itertools.groupby() and itertools.combinations_with_replacement()
Not a deal breaker, it's just a drag when you only work in a language once every few months, and you constantly have to look at the docs to know whether something is alllowercase, ALLCAPS, camelCased, with_underscores, etc.