Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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.


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.


Hmm, I hadn't checked the license. Pylance is indeed proprietary.


Pyright is open source (MIT)


Pyright works well for me in vim-coc. Of course ymmv


Google's pytype seems to be better deployed within the standard PyPi ecosphere. The Microsoft packages you're using aren't.


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


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.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: