News for hackers. Stuff that matters.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by satya71 on Wednesday April 14, 2021 @08:26PM (#26814829)
Hmm, I mostly use Pylance/Pyright because of tight integration with VS Code. Wonder why they chose PyType, which I believe is not very widely used.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by IceWreck on Thursday April 15, 2021 @12:32AM (#26816212)
Pylance/Pyright are proprietary and don't even work on open source builds of VScode (theyre hardcoded to work only on MS builds of VSCode), let alone any other IDE.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by nyanpasu64 on Thursday April 15, 2021 @04:02AM (#26817451)
From what I can tell, Pylance is proprietary and intended to "extend/extinguish" the open-source VSCode codebase with Microsoft's proprietary VSCode binaries, but Pyright is open-source.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by satya71 on Thursday April 15, 2021 @07:37AM (#26819138)
Hmm, I hadn't checked the license. Pylance is indeed proprietary.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by Spiritus on Thursday April 15, 2021 @01:31AM (#26816478)
Pyright is open source (MIT)
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by Evan-Purkhiser on Thursday April 15, 2021 @02:55AM (#26816952)
Pyright works well for me in vim-coc. Of course ymmv
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by mcstafford on Wednesday April 14, 2021 @08:38PM (#26814901)
Google's pytype seems to be better deployed within the standard PyPi ecosphere. The Microsoft packages you're using aren't.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by Mehdi2277 on Wednesday April 14, 2021 @08:44PM (#26814944)
That’s because pyright was written in typescript so it makes sense to use npm to install it. Pyright has weak ide support beyond visual studio stuff. I’m pretty fond of pyright due to how responsive the developer is on GitHub. I’ve made multiple issues before and gotten an answer same day (sometimes same hour) and some small bugs I’ve reported got fixed in the next release (which happens like twice a week).
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by IshKebab on Thursday April 15, 2021 @02:40AM (#26816854)
I was wondering the same thing. I've never even heard of PyType, but I use Pyright every day. I expect many developers are similar.

Does Pyright behave like MyPy or PyType? Or neither?

Also did Python really create a type annotation system without specifying the semantics of how it is supposed to work? That's crazy.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by Mehdi2277 on Thursday April 15, 2021 @05:20AM (#26818103)
The type system is specified but the main pep people point to is the base type system. There have been multiple extension peps adding new type features and different type checkers have different progress implementing them. Also different type checkers have different bonus features. Mypy comes with plug-in support to make it easier to extend the system for very dynamic custom situations. Pyright is able to generate rough guess type stubs for untyped codebases. Pyre has the best tensor related type support likely motivated by Facebook having pytorch. Pytype I know the least about but it likely has some unique features motivated by google usage.

If the type checkers disagree on stuff defined in pep 484 that’s a bug to report. Beyond that they can vary but feel mostly similar.