MITB Banner

What To Expect In Python 3.8: Easy Debugging, Extensive API For C Extension & Walrus Operator

Python has proven to be the go-to language in the field of machine learning and data science. According to our recent survey, over 75 percent of respondents said that it is crucial for job seekers to have Python skills to get an opportunity in data science. The beta cycle releases of Python version 3.8 has been around the corner since the beginning of 2019 and the latest beta version of Python 3.8.0 beta 3 is expected to be released today.

What’s New?

Python 3.8 is still in the development phase and according to the team, the beta version has included a number of intuitive as well as notable features. PEP stands for Python Enhancement Proposal and is a design document providing information to the Python community, or describing a new feature for Python or its processes or environment. According to the PEPs submitted for version 3.8, there are several major new features in Python 3.8 than the earlier version of 3.7.

The new features are mentioned below:

  • Assignment Expressions: Python 3.8 includes the Walrus Operator (:=), one of the most important features included in this version. This is a new syntax used to assign values to variables as part of an expression using the notation NAME := expr. This PEP is a controversial one by the supporters as well as critics while in the developing stage.
  • Positional-Only Parameters: This PEP proposes to introduce a new syntax, /, for specifying positional-only parameters in Python function definitions.
  • Python Initialisation Configuration: This feature adds a new C API to configure the Python Initialisation providing finer control on the whole configuration and better error reporting. 
  • Vectorcall: This feature introduces a new C API to optimise calls of objects i.e. it introduces a new “vectorcall” protocol and calling convention based on the “fastcall” convention, which is already used internally by CPython.
  • Python Runtime Audit Hooks: This feature describes additions to the Python API including the specific behaviors for the CPython implementation which make actions taken by the Python runtime visible to auditing tools. 
  • Pickle Protocol 5: Pickle protocol 5 with out-of-band data is a new pickle protocol version (5) to cover the extra metadata needed for out-of-band data buffers. This PEP aims to make pickle usable in a way where large data is handled as a separate stream of zero-copy buffers, letting the application handle those buffers optimally. 

Other interesting changes include typing-related features which contain the final qualifier, literal types, and TypedDict, parallel filesystem cache for compiled bytecode, debug builds share ABI as release builds, LOAD_GLOBAL is now 40% faster, typed_ast is merged back to CPython, -strings support a handy = specifier for debugging, pickle now uses Protocol 4 by default, improving performance and much more. 

The developer team of Python suggests the users must perform testing during the beta phase in order to ensure that there will be no issues when the stable version of 3.8 will be released. They stated that third party users are strongly encouraged to test the beta version and hence report the problems which are being found to the Python bug tracker. The features will be modified and in rare conditions can be deleted too. “Our goal is to have no ABI changes after beta 3 and no code changes after 3.8.0rc1, the release candidate. To achieve that, it will be extremely important to get as much exposure for 3.8 as possible during the beta phase as possible.”

Access all our open Survey & Awards Nomination forms in one place >>

Picture of Ambika Choudhury

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.

Download our Mobile App

CORPORATE TRAINING PROGRAMS ON GENERATIVE AI

Generative AI Skilling for Enterprises

Our customized corporate training program on Generative AI provides a unique opportunity to empower, retain, and advance your talent.

3 Ways to Join our Community

Telegram group

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

Discord Server

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

Subscribe to our Daily newsletter

Get our daily awesome stories & videos in your inbox
Recent Stories