1

As I understand methods in Python should always be lowercase with underscore (PEP8 naming convention).

Today I was using the xml.sax package for the first time and noticed that several methods are in CamelCase while others are in under_score. Examples:

def make_parser(parser_list=()):

def parseString(string, handler, errorHandler=ErrorHandler()):

def startElement(self, name, attrs):

Where does this inconsistency come from? Is it grown historically or is there more behind it?

SuperStormer
  • 4,997
  • 5
  • 25
  • 35
Gorasa
  • 13
  • 4
  • Related: [How come the Python's logging module doesn't follow PEP8 conventions?](https://stackoverflow.com/questions/22993667/how-come-the-pythons-logging-module-doesnt-follow-pep8-conventions) – wwii May 16 '20 at 13:59
  • Ah thanks, I see for backward compatibility. But still I would expect that there are some wrapper methods that follow the PEP8 naming convention. – Gorasa May 16 '20 at 14:12

0 Answers0