Skip to content
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

Python type hinting discussion #16

Open
Tracked by #55
stscieisenhamer opened this issue Dec 27, 2016 · 4 comments
Open
Tracked by #55

Python type hinting discussion #16

stscieisenhamer opened this issue Dec 27, 2016 · 4 comments

Comments

@stscieisenhamer
Copy link
Contributor

Be great to have a discussion of the if/how/when/why of using the new Python type hinting. Even if its the short "nope".

@eteq
Copy link
Contributor

eteq commented Oct 5, 2017

I (@eteq) knows a bit about this - could present if need be.

@pllim
Copy link
Contributor

pllim commented Sep 27, 2019

@pllim pllim mentioned this issue Sep 27, 2019
@jbcurtin
Copy link

jbcurtin commented Sep 27, 2019

I'd like to hear @eteq comments on this. I'm pretty all over the place with my typing usage and I haven't really integrated mypy or black into my process yet. At the end of the day mypy enforces the annotations(typing) you write in your scripts so that you're not crossing data types in the same var-containers. I violate this with common statements like:

datum: typing.Dict[str, typing.Any] = {'data': []}
datum: typing.List[str] = datum['data']

☝️ maybe valid for mypy, but I wouldn't know

@pllim
Copy link
Contributor

pllim commented Apr 7, 2023

People are adopting it but not all packages support it. Python still not going to enforce it natively. Still a little controversial.

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

No branches or pull requests

4 participants