Bold Health partners with the University of Pennsylvania for clinical trial of its Zemedy IBS app

The School of Arts and Science of the prestigious University of Pennsylvania has tendered a public invitation for suitable individuals to participate in a waitlist randomised control trial aimed at…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Python 3.10.0 Update Everything You Need To Know

According to the TIOBE(The Importance Of Being Earnest) Index Python is the most popular language according to the global developers community. As by facts of community Python released its latest Upgrade Python 3.10.0 on October 04,2021 soon after 30th anniversary of Programming language While there are many new features I’ll discuss about most important and useful features in this article.

Summary of Update

New syntax features:

New features in the standard library:

Interpreter improvements:

New typing features:

Important deprecations, removals or restrictions:

Development team of Python improved its clarity of error messages in below Erros:

Syntax Errors, Indentation Error, Attribute Error, Name Errors.

For Example:

Syntax Error

Previous version of interpreter Error message

In Latest Updated Error message is Exact(Which is wonderful)

Indentation Error

Many Indentation Error exceptions now have more context regarding what kind of block was expecting an indentation, including the location

Attribute Error

Structural Pattern matching lets you match variables against one of a set of possible values As switch/case in Java script language and it also allows you to match against pattern of values ex: an object with a certain property set to a certain value. This makes Structural Pattern Matching Very interesting and expands the endless possibilities and make it possible to write code that quickly encompasses a variety of scenarios

Example 1

Object with a certain Property set a value

Developers have added two new options to improve the information provided to static type checkers for ‘Callable’ to the ‘typing’ module. The first is the parameter specification variable which is used to forward the parameter types of one callable to another, a pattern usually found in higher-order functions and decorators.

The second one, the ‘Concatenate’ operator, is used in conjunction with parameter specification variables to annotate a higher-order callable which adds or removes parameters of another callable.

Python Developers Introduced new type union operator which enables the syntax X | Y. This provides a cleaner way of expressing ‘either type X or type Y’ instead of using typing.Union.

Before Version
Latest Version

Other Important Updates:

Thank You.

Add a comment

Related posts:

Stop Overthinking it. Just get Started

This has been my mantra for quite a while because at times I tend to overthink things then not do anything. I like to think I’m the ‘do it first, then correct it as I go on’ type of person but at…

These Five Things Will Help You Think Before You Spend

Impulse spending can be a very expensive problem, but it’s also become the norm for many consumers. You can either constantly tell yourself you need to think before you spend, or you can put these…

How the gym changed my life story

So I stood quiet and never said a word in class, never raised up my hand to answer questions or ask for help even if I really really needed it During this time in high school, I started hitting the…