Eric V. Smith <e...@trueblade.com> added the comment:

I know you know this, but here's a version without dataclasses, in case you 
want to add a test for this, too.

from enum import Enum

class Foo:
    def __init__(self, a):
        self.a = a
    def __repr__(self):
        return f'Foo(a={self.a!r})'

class Entries(Foo, Enum):
    ENTRY1 = Foo(1)

repr(Entries.ENTRY1) != '<Entries.ENTRY1: Foo(a=1)>'

----------
nosy: +eric.smith

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

Reply via email to