Loading video player…

Cool New Features in Python 3.8: Overview

In this course, you’ll get a look into the newest version of Python. On October 14th, 2019 the first official version of Python 3.8 became ready.

What does Python 3.8 bring to the table? The documentation gives a good overview of the new features. However, this course will go more in depth on some of the biggest changes and show you how you can take advantage of Python 3.8.

You’ll learn about the following:

  • Using assignment expressions to simplify some code constructs
  • Enforcing positional-only arguments in your own functions
  • Specifying more precise type hints
  • Using f-strings for simpler debugging

With a few exceptions, Python 3.8 contains many small improvements over the earlier versions. Towards the end of the course, you’ll see many of these less attention-grabbing changes, as well as a discussion about some of the optimizations that make Python 3.8 faster than its predecessors.

If you want to learn more, additional resources will be referenced and linked to throughout the course.

To download the code in this course, click the link below:


Sample Code (.zip)

11.4 KB

To download the slides in this course, click the link below:


Course Slides (PDF)

989.8 KB

00:00 Hi, I’m Chris Bailey from Real Python, and I want to welcome you to the course Cool New Features in Python 3.8. What are the new features you’ll learn about?

00:09 You’ll explore using assignment expressions to simplify some code constructs. You’ll learn how to enforce positional-only arguments in your own functions.

00:20 You’ll take a dive into type checking to learn how to specify even more precise type hints. You’ll check out enhancements to the f-string that allow for simpler debugging.

00:30 And that’s just a few. Let me give you an overview of the table of contents. There’s this intro and overview. Then you’ll dive into assignment expressions and learn about what’s being called the walrus operator (:=).

00:46 Next, you’ll learn how to specify positional-only arguments in your own functions. Then it’s a rather deep dive into type checking to explore four new more precise types.

01:02 You’ll learn how f-strings have been enhanced to allow simpler debugging. The next is not so much a feature but more of a change in the community, with the Python steering council.

01:20 Then you’ll get into a handful of other new features, like importlib.metadata.

01:30 You’ll get a chance to check out some of the new math and statistics functions.

01:38 New warnings inside of Python 3.8 about potentially dubious syntax. And finally, a chance to check out some of the new optimizations in Python 3.8. Wrapping up with a conclusion and course review. Well, let me have you dive in to the walrus in the room, assignment expressions, up next.

Avatar image for Dan Bader

Dan Bader RP Team on Nov. 29, 2019

Hey folks, if you’re new to Real Python and you’re wondering how our course platform and other features work, click here to check out our Welcome to Real Python course. Happy Pythoning! :)

Avatar image for umesh191994uk

umesh191994uk on Dec. 2, 2019

Thanks! You guys are awesome.

Avatar image for chomaanyu

chomaanyu on Dec. 2, 2019

is python 3.8 backward compatible?

Avatar image for Geir Arne Hjelle

Geir Arne Hjelle RP Team on Dec. 2, 2019

Essentially: Yes, Python 3.8 is backwards compatible.

With the exception of a few deprecated functions that have been removed all Python 3.7 code should work on 3.8 as well.

The other way around: if you use any of the new syntax like assignment expressions, positional-only parameters, or f-string debugging, those will naturally not work in older Python versions.

Become a Member to join the conversation.