original) (raw)
(On 5 May 2013 10:49, Eli Bendersky <eliben@gmail.com> wrote:
Fixed, thanks.
One thing I'd like to be clear in the PEP about is whether enum_type and _EnumDict._enum_names 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