On 12/1/2021 12:47 AM, Oscar Benjamin wrote:
On Tue, 30 Nov 2021 at 23:37, Guido van Rossum <gu...@python.org> wrote:
We should definitely push back on zealous new converts to typing who insist
that everything should be annotated. But we should also recognize that even in
their current, far from perfect state, type annotations can provide a lot of
value, when used right. (Have you run into VS Code yet? It gets tremendous
value from typing stubs, in the form of improved auto-complete and hover-doc
functionality.)
I might be misunderstanding but if "hover-doc" is the same as
"mouse-over" then it apparently needs many gigabytes of memory and a
lot of CPU time when you put the mouse over a sympy function that you
are using in your code. It has been suggested that SymPy should fix
this by adding hints like Any but I don't see the point of that: SymPy
has plenty of bugs but this particular bug is in VS Code.
For the record, this is the *old* support that has since been replaced
(and was based on full program analysis in the Python of ~2010 that had
no annotations at all, so always struggled with programs that could not
be thoroughly inferred and particularly with those that generated
runtime types - Sympy was a special case in it since about 2012 to avoid
those issues, but that may have been lost when it was migrated from
Visual Studio to VS Code).
The latest versions of VS Code have a completely new system, that does
rely very heavily on programs and libraries being annotated, in exchange
for being much lighter on memory use and preprocessing. But it should
stay out of your way on unannotated code if you haven't enabled its more
strict modes.
Cheers,
Steve
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/LHNW4CDJVJKNWTCJSTLVMBOBFUYMSWGZ/
Code of Conduct: http://python.org/psf/codeofconduct/