The Python standard library and PEP8

Tim Wintle tim.wintle at teamrubber.com
Mon Apr 20 23:18:15 EDT 2009


On Sun, 2009-04-19 at 18:43 +0200, Emmanuel Surleau wrote:
> 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.

I seem to remember there was talk about this on python-dev fairly
recently, and basically they wish they had changed more of them in
python 3, but as they didn't they are likely to stay.

> 
> 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?

There was some suggestion about introducing synonyms that followed PEP8
and introducing deprecation warnings as you suggested, but I can't
remember the outcome. I'd suggest checking the dev archives.





More information about the Python-list mailing list