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

Support Any(val)? #33

Closed
gvanrossum opened this issue Jan 7, 2015 · 4 comments
Closed

Support Any(val)? #33

gvanrossum opened this issue Jan 7, 2015 · 4 comments

Comments

@gvanrossum
Copy link
Member

I just noticed that mypy's typing.py says that Any can be used to cast a value to type Any. E.g.

x = 42  # type: int
y = Any(x)
y.append(42)  # No error

Do we want/need this? What other notation could be used that we already support?

@JukkaL
Copy link
Contributor

JukkaL commented Jan 8, 2015

Mypy understands Any(x) as an alternative syntax for cast(Any, x). It's just a small convenience feature and not essential.

@gvanrossum
Copy link
Member Author

Let's not have that in the PEP.

@ambv ambv self-assigned this Jan 8, 2015
@ambv
Copy link
Contributor

ambv commented Jan 8, 2015

OK.

@JukkaL
Copy link
Contributor

JukkaL commented Jan 17, 2015

Added mypy issue for removing support for Any(x): python/mypy#558

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

3 participants