They pasted the code / results as screenshots.
But you got the gist.
In the future, it's really better to use plain text for email lists.
-CHB
On Mon, Nov 30, 2020 at 05:19:13PM +0400, Abdulla Al Kathiri wrote:
> In python 3.9, I get the following error:
>
>
> In python 3.10, I get no runtime errors:
>
>
>
>
Did you forget to paste the text? Or did gmail eat it?
> However, Pylance (I am not sure about mypy) didn’t recognize Any. Instead it made it “Unknown”.
That's probably a question for the Pylance devs, but my guess is that
anything flagged as "Any" type is the same as flagging it as "I don't
know what that type is".
> In fact, I can put anything in 3.10 annotation and it runs just fine.
> I am not sure if this is the intention of Python3.10
Yes, Python 3.10 makes the `from __future__ import annotations`
behaviour occur automatically. See PEP 563:
https://www.python.org/dev/peps/pep-0563/
(At least, I'm guessing that's what is happening here, it has to be a
guess because I can't see the code you run and the error you get.)
--
Steve
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/YMJ5NMD3OQOMKWHMMOZAE3WWGHZJD7OY/
Code of Conduct: http://python.org/psf/codeofconduct/
--
Christopher Barker, PhD
Python Language Consulting
- Teaching
- Scientific Software Development
- Desktop GUI and Web Development
- wxPython, numpy, scipy, Cython