Ethan Furman added the comment:


- only allow one base Enum class
  (fails with All and IntFlag)

- only allow base Enum classes that are compatible
 (so not an Enum and a Flag)
 (would require multiple base classes for the same behavior: DocEnum,
  DocFlag, etc.)

- only allow one mixin
  (before/after that one mixin the inheritance is linear)
  (same issue as above)

- only allow one non-Enum mixin, critical Enum is last one in the bases,
  previous Enums in bases are mixins
  (all sunder/dunder methods come from critical Enum, all normal methods
  and attributes are in normal base order)

- be smarter about determining/saving the correct __new__ and base data type

The last one needs to happen, and some form of the next-to-last one (hopefully 
allowing for more than one non-Enum mixin).


Python tracker <>
Python-bugs-list mailing list

Reply via email to