Congratulations on completing this course! With everything you’ve learned, should you upgrade to Python 3.8?
Let’s start with the simpler answer. If you want to try out any of the new features you have seen here, then you do need to be able to use Python 3.8. Tools like pyenv
and Anaconda make it easy to have several versions of Python installed side by side. Alternatively, you can run the official Python 3.8 Docker container. There is no downside to trying out Python 3.8 for yourself.
Now, for the more complicated questions. Should you upgrade your production environment to Python 3.8? Should you make your own project dependent on Python 3.8 to take advantage of the new features?
You should have very few issues running Python 3.7 code in Python 3.8. Upgrading your environment to run Python 3.8 is therefore quite safe, and you would be able to take advantage of the optimizations made in the new version. Different beta-versions of Python 3.8 have already been available for months, so hopefully most bugs are already squashed. However, if you want to be conservative, you might hold out until the first maintenance release (Python 3.8.1) is available.
Once you’ve upgraded your environment, you can start to experiment with features that are only in Python 3.8, such as assignment expressions and positional-only arguments. However, you should be conscious about whether other people depend on your code, as this will force them to upgrade their environment as well. Popular libraries will probably mostly support at least Python 3.6 for quite a while longer.
See Porting to Python 3.8 for more information about preparing your code for Python 3.8.
To download the code in this course, click the link below:
To download the slides in this course, click the link below:
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.
Marco Belo on Nov. 6, 2019
Cool, I do use a lot that print
f"variable={variable}"
to log what is happening, the new feature will sure help me.