This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Ricyteach
Recipients Ricyteach, eric.smith, levkivskyi
Date 2018-03-31.01:01:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522458091.51.0.467229070634.issue33188@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2018-03-31 01:01:31Ricyteachsetrecipients: + Ricyteach, eric.smith, levkivskyi
2018-03-31 01:01:31Ricyteachsetmessageid: <1522458091.51.0.467229070634.issue33188@psf.upfronthosting.co.za>
2018-03-31 01:01:31Ricyteachlinkissue33188 messages
2018-03-31 01:01:30Ricyteachcreate