I'm also confused about what you are trying to achieve here. Note that:

assert Entries.ENTRY1.value.a == 1
 
should work.

But my main thought is that dataclasses are really just a way to auto-generate classes without having to write a bunch of boilerplate. So you example above is equivalent to:

class Foo:
    def __init__(self, a=0):
        self.a = a

Which behaves the same way when used the same way with Enum.

So why should dataclasses be special in this particular way?

-CHB


--
Christopher Barker, PhD (Chris)

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython