Active Hackathon

A New Python Language Support In Visual Studio Code

Recently, Microsoft announced Pylance, which is fast and feature-rich language support for Python in Visual Studio Code. According to a blog post, the name Pylance serves as a bow to Monty Python’s Lancelot, who is known to be the first knight to answer the bridgekeeper’s questions in the Holy Grail.

Two years back, the Python team of the tech giant released the Python Language Server that brought Visual Studio’s rich Python IntelliSense support to Visual Studio Code. The Pylance language server is an enhancement to the Python Language Server. 


Sign up for your weekly dose of what's up in emerging technology.

Behind Pylance

Pylance is a language server for Python language that utilises the Language Server Protocol in order to communicate with Visual Studio Code. The developers at the tech giant created Pylance as a brand-new language server based on Microsoft’s Pyright static type checking tool in order to deliver an improved user experience.

Pylance provides users with the ability to customise their Python language support through a host of settings that can either be placed in the settings.json file in the workspace or can be edited through the Settings Editor UI.

According to the blog post, the new Pylance extension is complementary to the Python extension for Visual Studio Code. You can easily try the Pylance by downloading the Python extension straight from the Visual Studio Code marketplace.

Features of Pylance

Pylance provides performant language support, and it leverages Microsoft’s open-source static type checking tool, Pyright, in order to provide performant language support for Python language.

Pylance provides several intuitive features for Python 3 that include docstrings, parameter suggestions, code completion, auto-imports, as-you-type reporting of code errors and warnings, code outline, code navigation, code lens, type checking mode, IntelliCode, Jupyter notebook’s compatibility, and multi-root workspace support among others. 

Some of the features of this new language server are mentioned below: –

Optimised Performance

Pylance supercharges the Python IntelliSense experience with rich type information and helps a developer to write better code quickly. The Pylance extension is also dispatched with a cluster of type stubs for modules that provide fast and accurate auto-completion and type checking.

Type Information

Type information is now made available in function signatures. While hovering on symbols, Pylance provides a user with helpful data to assure that the user is correctly invoking functions to improve code quality. 


Auto-Imports is one of the most requested features of Pylance. This feature allows you to get smart import suggestions of installed and standard library modules for autocompletion.

Type Checking Diagnostics

The type checking mode in Pylance can be used by setting python.analysis.typeCheckingMode to basic or strict mode. The setting uses Pyright’s type checking to apply either a basic or comprehensive set of rules over your codebase, respectively. And the diagnostics produced from these modes can help improve the quality of your code and help you find edge cases easily.

Multi-Root Workspace Support

Pylance assists multi-root workspaces in a very naive manner. This means that a user can open more than one folder in the same Visual Studio Code session and also have Pylance functionality in each of the folders.

Wrapping Up

According to the developer of the tech giant, this new Python language support represents a drastic improvement for the Python experience on Visual Studio Code. According to the blog post, the new, free language server offers increased performance and many more features.

Currently, in the short term plan, a user will still be able to use the Microsoft Python Language Server as a choice of language server when writing Python in Visual Studio Code. While in the long term plan, the developers are planning to transition the Microsoft Python Language Server users over to Pylance and eventually deprecate and remove the old language server as a supported option.

More Great AIM Stories

Ambika Choudhury
A Technical Journalist who loves writing about Machine Learning and Artificial Intelligence. A lover of music, writing and learning something out of the box.

Our Upcoming Events

Conference, Virtual
Genpact Analytics Career Day
3rd Sep

Conference, in-person (Bangalore)
Cypher 2022
21-23rd Sep

Conference, in-person (Bangalore)
Machine Learning Developers Summit (MLDS) 2023
19-20th Jan

Conference, in-person (Bangalore)
Data Engineering Summit (DES) 2023
21st Apr, 2023

3 Ways to Join our Community

Discord Server

Stay Connected with a larger ecosystem of data science and ML Professionals

Telegram Channel

Discover special offers, top stories, upcoming events, and more.

Subscribe to our newsletter

Get the latest updates from AIM
How Data Science Can Help Overcome The Global Chip Shortage

China-Taiwan standoff might increase Global chip shortage

After Nancy Pelosi’s visit to Taiwan, Chinese aircraft are violating Taiwan’s airspace. The escalation made TSMC’s chairman go public and threaten the world with consequences. Can this move by China fuel a global chip shortage?

Another bill bites the dust

The Bill had faced heavy criticism from different stakeholders -citizens, tech firms, political parties since its inception

So long, Spotify

‘TikTok Music’ is set to take over the online streaming space, but there exists an app that has silently established itself in the Indian market.