Message314728
> passing keyword arguments to metaclass will be much more rare for dataclasses than passing a ready namespace
The impetus of my running into these issues was assuming that things like `Generic[MyTypeVar]` would "just work" with `make_dataclass`, which seemed like a valid assumption since the class creation approach made heavy use of by `dataclasses` implies this:
@dataclass
class MyDclass(Generic[MyTypeVar]):
var: MyTypeVar
The fact that I cannot do this, then, without error is surprising:
MyDclass = make_dataclass("MyDclass", (("var", MyTypeVar),), bases=(Generic[MyTypeVar],))
I'm not stating it HAS to be fixed. Maybe it doesn't have to. But to me, the above seems like the reason to do it if it's going to be done. |
|
Date |
User |
Action |
Args |
2018-03-31 01:01:31 | Ricyteach | set | recipients:
+ Ricyteach, eric.smith, levkivskyi |
2018-03-31 01:01:31 | Ricyteach | set | messageid: <1522458091.51.0.467229070634.issue33188@psf.upfronthosting.co.za> |
2018-03-31 01:01:31 | Ricyteach | link | issue33188 messages |
2018-03-31 01:01:30 | Ricyteach | create | |
|