[Python-Dev] PEP 435 - requesting pronouncement (original) (raw)

Tim Delaney timothy.c.delaney at gmail.com
Sun May 5 03:22:01 CEST 2013


On 5 May 2013 10:49, Eli Bendersky <eliben at gmail.com> wrote:

On Sat, May 4, 2013 at 4:27 PM, Tim Delaney <timothy.c.delaney at gmail.com>wrote:

Typo line 171: <Colro.blue: 3>

Fixed, thanks. One thing I'd like to be clear in the PEP about is whether enumtype and EnumDict.enumnames should be documented, or whether they're considered implementation details. No, they should not. Not only are they implementation details, they are details of the reference implementation, not the actual stdlib module. The reference implementation will naturally serve as a basis for the stdlib module, but it still has to undergo a review in which implementation details can change. Note that usually we do not document implementation details of stdlib modules, but this doesn't prevent some people from using them if they really want to.

I think it would be useful to have some guaranteed method for a sub-metaclass to get the list of enum keys before calling the base class new. Not being able to do so removes a large number of possible extensions (like auto-numbering).

In testing the below, I've also discovered a bug in the reference

implementation - currently it will not handle an mro like:

Thanks! Tim - did you sign the contributor CLA for Python? Since the reference implementation is aimed for becoming the stdlib enum eventually, we'd probably need you to sign that before we can accept patches from you.

I have now (just waiting on the confirmation email). Haven't submitted a patch since the CLAs were started ...

Tim Delaney -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20130505/05daadc4/attachment.html>



More information about the Python-Dev mailing list