Closed
Description
Hello, quick problem that I had with dataclasses.
I wanted to indicate that some dataclasses of my module are private (just used as fields of the final dataclass), thus prefixing them with __ . Example:
from dataclasses import dataclass, field
@dataclass
class __C:
c: int
@dataclass
class D:
d: __C = field(default_factory=__C)
This throws a mysterious:
NameError: name '_D__C' is not defined
Is this a bug ?