[issue33976] Enums don't support nested classes

2018-06-27 Thread Edward Wang
Edward Wang added the comment: Ethan - thank you for your speedy response! For an example you can see https://github.com/ucb-bar/hammer/blob/97021bc7e1c819747f8b8b6d4b8c76cdc6a488e3/src/hammer-vlsi/hammer_vlsi_impl.py#L195 - the ObstructionType enum is really only used inside

[issue33976] Enums don't support nested classes

2018-06-26 Thread Edward Wang
Change by Edward Wang : -- keywords: +patch pull_requests: +7557 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue33976> ___ ___ Py

[issue33976] Enums don't support nested classes

2018-06-26 Thread Edward Wang
New submission from Edward Wang : Methods defined in Enums behave 'normally' but classes defined in Enums get mistaken for regular values and can't be used as classes out of the box. ```python class Outer(Enum): a = 1 b = 2 class Inner(Enum): foo = 10 bar = 11