Nyktos wrote:Python standardized on underscores (with UpperCamelCase for classes) over a decade ago. There are a few prominent projects (Twisted and various Zope things) that use camel case, but those are all ancient.
have the following types:
Thus showing two styles of type name in one module (neither of which is using underscores). Maybe the functions and variables are standardized on underscores, but if type names aren't consistent that still means the naming scheme is inconsistent.
The collections module is using older naming conventions.* If you look at more recently added stdlib modules, they use the convention I described, as do do the vast majority of popular third-party packages.
* It doesn't actually predate PEP 8 itself, though, as I'd assumed. I'm not sure why deque and defaultdict were named that way, but they were
the first two things added to the module. namedtuple isn't actually a type.