The Python standard library and PEP8

Emmanuel Surleau emmanuel.surleau at gmail.com
Sun Apr 19 12:43:10 EDT 2009


Hi there,

Exploring the Python standard library, I was surprised to see that several 
packages (ConfigParser, logging...) use mixed case for methods all over the 
place. I assume that they were written back when the Python styling 
guidelines were not well-defined.

Given that it's rather irritating (not to mention violating the principle of 
least surprise) to have this inconsistency, wouldn't it make sense to clean 
up the API by marking old-style, mixed-case methods as deprecated (but 
keep them around anyway) and add equivalent methods following the 
lowercase_with_underscores convention?

On an unrelated note, it would be *really* nice to have a length property on 
strings. Even Java has that!

Cheers,

Emm



More information about the Python-list mailing list