• 20 Posts
  • 3.82K Comments
Joined 2 years ago
cake
Cake day: August 17th, 2023

help-circle









  • If it’s only in the type checker, can IDEs/editors correctly show the type information of inferred types then?

    Yep, and some (e.g. Pycharm) do. They have to be a bit careful with not assuming too much since lots of legacy code is written in fairly terrible ways, so e.g. default parameter values don’t necessarily set the type of their respective parameters, but it’s definitely possible and mostly a choice by the editor/IDE.

    Do they call the type checker themselves to retrieve that info?

    Depends on the editor! Pycharm is built on a custom engine by Jetbrains, whereas e.g. the Python VS code plugin by Microsoft (Pylance) is based on Microsofts type checker (pyright).