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:
(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.)