Nick Coghlan added the comment:

Simply removing the restriction isn't actually appropriate, as the variants 
that allow addition of new members should *not* allow addition of new 
descriptors.

That's why I'm wondering if the current subclassing restriction is wrong: if 
you subclass an Enum derivative that already has defined members, then adding 
new members is OK, but adding new behaviour is not. If you subclass an Enum 
derivative with no members, then adding either members or behaviours is fine.

If we relaxed the "no subclassing" rule to "no new non-members", then this 
Enums would be natively extensible and this customisation hack wouldn't be 
necessary at all.

We have plenty of time before 3.4 - let's get the existing implementation in 
before worrying further about this.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17954>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to