[Python-Dev] Best practices for Enum

Raymond Hettinger raymond.hettinger at gmail.com
Mon May 13 09:06:52 CEST 2013


On May 12, 2013, at 8:26 PM, Eli Bendersky <eliben at gmail.com> wrote:

> Thanks for the insights, Raymond. I don't think anyone is planning on rushing anything. We still have to get the enum module itself committed and a serious review process has just started for that, so it will take time.
> 
> There's no general "let's replace all constants with enums" TODO item that I know of. It's my hope that such changes will happen very gradually and only when deemed important and useful by core developers.

Ethan's email suggests that against my advice he is in-fact going to go through the standard library, applying enums quite broadly.

That is somewhat at odds with the notions of holistic refactoring and gradual change.  Nor does it reflect sufficient appreciation for concerns about maintenance issues, code stability, the effect on 2-to-3 migration, doctests, performance, the wishes of the module authors, or whether users will see any actual benefits (particularly for internal constants).

I fully understand the enthusiasm to take the car out for a spin, but the standard library isn't really a great place for experimentation.  And "trying to learn the standard library" isn't a good rationale for making extensive changes to it.

So, please do help make sure there is some restraint and careful consideration.


Raymond





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20130513/285c0b16/attachment.html>


More information about the Python-Dev mailing list