Skip to content

bpo-32278: Allow dataclasses.make_dataclass() to omit type information.#5115

Merged
ericvsmith merged 1 commit into
python:masterfrom
ericvsmith:bpo-32278-make_dataclasses-type-info-optional
Jan 6, 2018
Merged

bpo-32278: Allow dataclasses.make_dataclass() to omit type information.#5115
ericvsmith merged 1 commit into
python:masterfrom
ericvsmith:bpo-32278-make_dataclasses-type-info-optional

Conversation

@ericvsmith

@ericvsmith ericvsmith commented Jan 6, 2018

Copy link
Copy Markdown
Member

@ericvsmith
ericvsmith merged commit ed7d429 into python:master Jan 6, 2018
@ericvsmith
ericvsmith deleted the bpo-32278-make_dataclasses-type-info-optional branch January 6, 2018 21:14
Comment thread Lib/dataclasses.py
omitted, use the string 'typing.Any'. Field objects are created by
calling 'field(name, type [, Field])'.

C = make_class('C', [('a', int', ('b', int, Field(init=False))], bases=Base)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is a typo/unmatched paren: it should be ('a', int), not ('a', int'

@ericvsmith

Copy link
Copy Markdown
Member Author

Thanks. I've fixed it in #5118.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants