Python 3.9 Released - How to install Python3.9 and What's new in Python 3.9 ?

Share:

 

Python 3.9 Released - You need to know. What's new in Python 3.9?

 

Python 3.9 was released on 06 Oct 2020 and after several months of development and improvement by developers Python 3.9 released with new specific features. So, if you don’t know what’s new in python3.9 then this tutorial for you. 


In this tutorial, you know all about the new features of python3.9 and you will also know here whats removed from python3.9 a whats added in these new versions. 

If we talk about the summary of the new release then we will see here, the new syntax, built-in module, interpreter improvement, and also new library module in this version.

So, here we have listed the top new features changes in python3.9, you should know all about these features if you are a python lover or coding geek.


Dictionary Merge and Update Operators


If you are aware of python3.x then you know that have not any merge or update operator in the previous version. So they added Merge and update operator in the dictionary under the PEP 584 and you can test here.


New Features Operators and its symbols


Merge ( | )

Update ( |= )


Ex:- 

 


New Modules


zoneinfo – This module brings support for the IANA zone database to the standard library and it also adds zone info.ZonInfo, a concrete DateTime.tzinfo.


graphic – This module offer functionality to perform topological sorting of graphs


https- In this module, a new code added http.HTTPStatus 


ipaddress – Its support Ipv6 Scoped address with suffix %<scope_id>


math – the math.gcd() function supported two arguments in the previous version but nut it can handle multiple arguments.


Multiprocessing- Now, in this module we got a new close() method to explicitly close the queue.


And some more specific features are:-


  • Type Hinting Generics In Standard Collections
  • Flexible function and variable annotations
  • Python adopts a stable annual release cadence
  • Relaxing Grammar Restrictions On Decorators
  • Support for the IANA Time Zone Database in the Standard Library
  • String methods to remove prefixes and suffixes
  • New PEG parser for CPython
  • Garbage collection does not block on resurrected objects;
  • os.pidfd_open added that allows process management without races and signals;
  • Unicode support updated to version 13.0.0;
  • when Python is initialized multiple times in the same process, it does not leak memory anymore;
  • Some Python built-ins (range, tuple, set, frozenset, list, dict) are now sped up using PEP 590 vectorcall;
  • Some Python modules (_abc, audioop, _bz2, _codecs, _contextvars, _crypt, _functools, _json, _locale, operator, resource, time, _weakref) now use multiphase initialization as defined by PEP 489;
  • Some standard library modules (audioop, ast, grp, _hashlib, pwd, _posixsubprocess, random, select, struct, termios, zlib) are now using the stable ABI defined by PEP 384.


And if you want to know all new features in detail then I will recommend you to visit the official website www.python.org


How to Upgrade/Install Python 3.9 in Ubuntu Linux:- 


If you want to install a python3.9 new version in your system then here are some simple steps you, just type these commands and upgrade your python version.


1. Open your terminal by pressing (CTRL+Alt+T) on the keyboard, you can also search terminal from the system application launcher.


Now, its time to just follow some cmd and run these commands in your terminal:-


$ sudo add-apt-repository ppa:deadsnakes/ppa


2. Then run these commands to refresh the system packages cache, and install Python3.9 version in your system:-


$ sudo apt-get install python3.9


3. After installation you can check, your installed python version by using this one command:


 $ python3.9 --version 


Uninstall:- 


If you want to uninstall thePython3.9 packages, run command: 


$ sudo apt remove –autoremove python3.9 python2.9-minimal 


Final Verdict 


 We have listed the best features and installation process in this tutorial, if you have any doubt or any related query then just drop a mail for us or write your problem in the comment box.

No comments