Skip to content

Direct support ABC/Protocol mixin #35

Description

@tokarenko

I suggest to add direct support of abstract base classes and protocols mixins to aenum (and stdlib enum if possible).

Currently addition of ABC/Protocol mixin to Enum raises errors:

  • For ABC : "TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases"
  • For Protocols: "TypeError: Protocols cannot be instantiated"

and require workarounds. As far as I know there are no workaround for Protocol mixin (if one wants to explicitly indicate implementation in Enum).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions