Skip to content

csv DictReader should only yield OrderedDicts in Py3.6 #1478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

graingert
Copy link
Contributor

No description provided.

@graingert
Copy link
Contributor Author

although of course this is still wrong

out of the box DictReader supports returning floats and strings
restkey should be a generic type var of any hashable
restvar should be a generic type of any var

@graingert graingert force-pushed the csv-dict-reader-od-only-in-3-6 branch 2 times, most recently from 3df0b5c to fe221f8 Compare July 11, 2017 11:33
restkey: Optional[str] = ..., restval: Optional[str] = ..., dialect: _Dialect = ...,
*args: Any, **kwds: Any) -> None: ...
def __iter__(self) -> 'DictReader': ...
def __next__(self) -> _DRMapping: ...
Copy link
Member

Choose a reason for hiding this comment

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

This is redundant, you have __next__ below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh woops

@graingert graingert force-pushed the csv-dict-reader-od-only-in-3-6 branch from fe221f8 to e98474b Compare July 11, 2017 16:02
@graingert
Copy link
Contributor Author

@JelleZijlstra ok, done

@JelleZijlstra JelleZijlstra merged commit 2bb7ea9 into python:master Jul 15, 2017
gvanrossum pushed a commit to gvanrossum/mypy that referenced this pull request Jul 24, 2017
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.

2 participants