Skip to content

minor namedtuple fixes #2227

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
merged 1 commit into from
Aug 19, 2018
Merged

minor namedtuple fixes #2227

merged 1 commit into from
Aug 19, 2018

Conversation

JelleZijlstra
Copy link
Member

I'm hoping I'll be able to convince mypy to use these stubs to check calls to namedtuple(); see python/mypy#2127 and python/mypy#4788. Regardless, we should fix the namedtuple stubs in case other type checkers may be using them.

@ilevkivskyi
Copy link
Member

I'm hoping I'll be able to convince mypy to use these stubs to check calls to namedtuple()

I would recommend to not hope on this, named tuples are so deeply special-cased. I would rather recommend updating semanal_namedtuple.py, which should be straightforward.

@ilevkivskyi
Copy link
Member

Ah, I see you already did this :-)

@JelleZijlstra
Copy link
Member Author

Yes, it actually wasn't that hard.

@JelleZijlstra
Copy link
Member Author

This has been open for a while and is fairly simple; could someone review it? (@ilevkivskyi maybe?)

@ilevkivskyi ilevkivskyi merged commit 9e023e7 into python:master Aug 19, 2018
@JelleZijlstra JelleZijlstra deleted the betternt branch August 19, 2018 02:54
@JelleZijlstra
Copy link
Member Author

Thanks!

yedpodtrzitko pushed a commit to yedpodtrzitko/typeshed that referenced this pull request Jan 23, 2019
- The extra arguments aren't keyword-only in 2.7.
- Added the `defaults` argument in 3.7 (https://docs.python.org/3.7/library/collections.html#collections.namedtuple).
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