Python 3.14: Exploring the New Features
<p>Python 3.14 is here! Christopher Trudeau returns to discuss the new version with Real Python team member Bartosz Zaczyński. This year, Bartosz coordinated the series of preview articles with members of the Real Python team and wrote the showcase tutorial, “Python 3.14: Cool New Features for You to Try.” Christopher’s video course, “What’s New in Python 3.14”, covers the topics from the article and shows the new features in action.</p>
<p>Christopher and Bartosz dug into the new release to create code examples showcasing the new features for the tutorial and course. We look at the enhanced and more colorful REPL experience, better error messages, safer hooks for live debugging, and deferred annotation evaluation. We also discuss template strings, Zstandard compression, and multiple performance improvements.</p>
<p>We share our thoughts on the updates and offer advice about incorporating them into your projects. We also discuss when you should start running Python 3.14.</p>
<div class="alert alert-primary" role="alert">
<p><strong>Course Spotlight:</strong> <a href="https://realpython.com/courses/whats-new-python-314/">What’s New in Python 3.14</a></p>
<p>Covers Python 3.14’s key changes: free-threading, subinterpreters, t-strings, lazy annotations, new REPL features, and improved error messages.</p>
</div>
<p>Topics:</p>
<ul>
<li>00:00:00 – Introduction</li>
<li>00:02:03 – Cool New Features for You to Try - Tutorial</li>
<li>00:02:20 – What’s New in Python 3.14 - Video Course</li>
<li>00:02:54 – Even Friendlier Python REPL</li>
<li>00:05:05 – Allow “json” instead of “json.tool”</li>
<li>00:05:49 – Zstandard compression</li>
<li>00:06:37 – Working With Numbers</li>
<li>00:11:09 – Deferred Evaluation of Annotations</li>
<li>00:17:35 – More Helpful Error Messages</li>
<li>00:20:41 – Warnings in try…finally Blocks</li>
<li>00:22:08 – Safer Live Process Debugging</li>
<li>00:25:22 – Pathlib Improvements</li>
<li>00:26:50 – Additional assert methods for unittest</li>
<li>00:27:19 – Template Strings (T-strings)</li>
<li>00:31:01 – Free-threaded Build Updates</li>
<li>00:35:30 – Incremental Garbage Collector</li>
<li>00:37:59 – functools partial & placeholder improvement</li>
<li>00:40:13 – Video Course Spotlight</li>
<li>00:41:12 – Experimental JIT Builds</li>
<li>00:46:52 – Parallel Subinterpreters</li>
<li>00:48:59 – Unicode Database Update</li>
<li>00:49:47 – 𝜋thon - Easter Egg</li>
<li>00:51:26 – Starting to use the new version</li>
<li>00:55:26 – Thanks and goodbye</li>
</ul>
<p>Show Links:</p>
<ul>
<li><a href="https://realpython.com/python314-new-features/">Python 3.14: Cool New Features for You to Try – Real Python</a></li>
<li><a href="https://realpython.com/courses/whats-new-python-314/">What’s New in Python 3.14</a></li>
<li><a href="https://realpython.com/python-repl-autocompletion-highlighting/">Python 3.14 Preview: REPL Autocompletion and Highlighting – Real Python</a></li>
<li><a href="https://realpython.com/python313-repl/">Python 3.13 Preview: A Modern REPL – Real Python</a></li>
<li><a href="https://github.com/python/cpython/issues/122873">Allow “-m json” instead of “-m json.tool” · Issue #122873</a></li>
<li><a href="https://docs.python.org/3.14/library/compression.zstd.html">compression.zstd — Compression compatible with the Zstandard format — Python 3.14.0 documentation</a></li>
<li><a href="https://realpython.com/python-annotations/">Python 3.14 Preview: Lazy Annotations – Real Python</a></li>
<li><a href="https://realpython.com/python314-error-messages/">Python 3.14 Preview: Better Syntax Error Messages – Real Python</a></li>
<li><a href="https://docs.python.org/3/whatsnew/3.14.html#pep-765-control-flow-in-finally-blocks">PEP 765: Control flow in finally blocks — Python 3.14.0 documentation</a></li>
<li><a href="https://docs.python.org/3.14/howto/remote_debugging.html#remote-debugging">Remote debugging attachment protocol — Python 3.14.0 documentation</a></li>
<li><a href="https://realpython.com/python-t-strings/">Python 3.14 Preview: Template Strings (T-Strings)</a></li>
<li><a href="https://github.com/python/cpython/issues/119127">functools.partial placeholders · Issue #119127</a></li>
<li><a href="https://github.com/python/cpython/blob/3.14/InternalDocs/garbage_collector.md">garbage_collector Internal Docs at 3.14</a></li>
<li><a href="https://realpython.com/python313-free-threading-jit/">Python 3.13: Free Threading and a JIT Compiler</a></li>
<li><a href="https://docs.python.org/3/whatsnew/3.14.html#pep-734-multiple-interpreters-in-the-standard-library">Multiple interpreters in the standard library — Python 3.14.0 documentation</a></li>
</ul>
<p>Additional Links:</p>
<ul>
<li><a href="https://docs.python.org/3/whatsnew/3.14.html#pep-784-zstandard-support-in-the-standard-library">PEP 784: Zstandard support in the standard library - Python 3.14.0 documentation</a></li>
<li><a href="https://realpython.com/podcasts/rpp/262/">Episode #262: Travis Oliphant: SciPy, NumPy, and Fostering Scientific Python</a></li>
<li><a href="https://realpython.com/python-complex-numbers/">Simplify Complex Numbers With Python – Real Python</a></li>
<li><a href="https://realpython.com/courses/pathlib-python/">Using Python’s pathlib Module – Real Python</a></li>
<li><a href="https://realpython.com/courses/exploring-t-strings/">Exploring Python T-Strings – Video Course</a></li>
<li><a href="https://realpython.com/python313-free-threading-jit/">Python 3.13 Preview: Free Threading and a JIT Compiler – Real Python</a></li>
<li><a href="https://py-free-threading.github.io/tracking/">Compatibility Status Tracking - Python Free-Threading Guide</a></li>
<li><a href="https://pypy.org/">PyPy</a></li>
<li><a href="https://realpython.com/lessons/functools-module/">functools Module (Video) – Real Python</a></li>
<li><a href="https://realpython.com/python312-subinterpreters/">Python 3.12 Preview: Subinterpreters – Real Python</a></li>
</ul>
<p>Level up your Python skills with our expert-led courses:</p>
<ul>
<li><a href="https://realpython.com/courses/new-features-python-313/">What's New in Python 3.13</a></li>
<li><a href="https://realpython.com/courses/whats-new-python-314/">What's New in Python 3.14</a></li>
<li><a href="https://realpython.com/courses/new-features-python-312/">What's New in Python 3.12</a></li>
</ul> <p><a rel="payment" href="https://realpython.com/join">Support the podcast & join our community of Pythonistas</a></p>
Creating a Guitar Synthesizer & Generating WAV Files With Python
<p>What techniques go into synthesizing a guitar sound in Python? What higher-level programming and Python concepts can you practice while building advanced projects? This week on the show, we talk with Real Python author and core team member Bartosz Zaczyński about his recent step-by-step project, Build a Guitar Synthesizer: Play Musical Tablature in Python.</p>
<p>Bartosz shares how he had built an early prototype of the guitar synth using a different language. He describes recreating the Karplus-Strong algorithm in Python to create the plucked guitar sounds. We discuss teaching advanced Python concepts while guiding readers through constructing a complete project.</p>
<p>We also dig into reading and writing WAV files in Python, using Spotify’s pedalboard library, implementing Poetry in a project, and designing a file format for guitar tablature.</p>
<p>This episode is sponsored by Mailtrap.</p>
<div class="alert alert-primary" role="alert">
<p><strong>Course Spotlight:</strong> <a href="https://realpython.com/courses/playing-and-recording-sound-python/">Playing and Recording Sound in Python</a></p>
<p>In this course, you’ll learn about libraries that can be used for playing and recording sound in Python, such as PyAudio and python-sounddevice. You’ll also see code snippets for playing and recording sound files and arrays, as well as for converting between different sound file formats.</p>
</div>
<p>Topics:</p>
<ul>
<li>00:00:00 – Introduction</li>
<li>00:02:04 – Reading and writing WAV files in Python</li>
<li>00:04:48 – What did you want to learn about the topic?</li>
<li>00:08:02 – Finding new ways to explain Python concepts </li>
<li>00:09:52 – Turning audio into plots and visualizations </li>
<li>00:12:11 – Using Python for synthesis and the guitar synth project </li>
<li>00:13:19 – What is your music background?</li>
<li>00:18:36 – Sponsor: Mailtrap</li>
<li>00:19:11 – First prototype of the project</li>
<li>00:22:23 – What does the project cover?</li>
<li>00:25:08 – Audio examples of the output</li>
<li>00:26:31 – Digging into the algorithm</li>
<li>00:31:40 – Convolution reverb</li>
<li>00:34:15 – Physical modeling and pedalboard</li>
<li>00:38:08 – Video Course Spotlight</li>
<li>00:39:31 – What Python concepts are you practicing?</li>
<li>00:41:11 – Using Python poetry </li>
<li>00:43:00 – Why use YAML for the TAB files?</li>
<li>00:46:13 – What does it mean to be a polyglot programmer?</li>
<li>00:48:37 – Potential upcoming Real Python resources</li>
<li>00:52:10 – How can people follow your work online?</li>
<li>00:52:30 – What do you want to learn next?</li>
<li>00:54:56 – Thanks and goodbye</li>
</ul>
<p>Show Links:</p>
<ul>
<li><a href="https://realpython.com/python-guitar-synthesizer/">Build a Guitar Synthesizer: Play Musical Tablature in Python – Real Python</a></li>
<li><a href="https://realpython.com/python-wav-files/">Reading and Writing WAV Files in Python – Real Python</a></li>
<li><a href="https://realpython.com/podcasts/rpp/200/">Episode #200: Avoiding Error Culture and Getting Help Inside Python – The Real Python Podcast</a></li>
<li><a href="https://en.wikipedia.org/wiki/ActionScript">ActionScript - Wikipedia</a></li>
<li><a href="https://flex.apache.org/">Apache Flex® - Home Page</a></li>
<li><a href="https://toomanyzooz.com/">Too Many Zooz - Official Website</a></li>
<li><a href="https://tv.apple.com/us/episode/reverb/umc.cmc.60c384wwnrxmpnp7nsygpuprq">Watch Reverb - Watch the Sound With Mark Ronson (Season 1, Episode 3) - Apple TV+</a></li>
<li><a href="https://www.youtube.com/watch?v=3DkpPYfvH_A">Longest Reverb In the World - Inchindown - YouTube</a></li>
<li><a href="https://en.wikipedia.org/wiki/Karplus%E2%80%93Strong_string_synthesis">Karplus–Strong string synthesis - Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Physical_modelling_synthesis">Physical modeling synthesis - Wikipedia</a></li>
<li><a href="https://github.com/spotify/pedalboard">pedalboard: 🎛 🔊 A Python library for audio - Spotify</a></li>
<li><a href="https://python-poetry.org/">Poetry - Python dependency management and packaging made easy</a></li>
<li><a href="https://realpython.com/dependency-management-python-poetry/">Dependency Management With Python Poetry – Real Python</a></li>
<li><a href="https://realpython.com/python-yaml/">YAML: The Missing Battery in Python – Real Python</a></li>
<li><a href="https://www.songsterr.com/">Guitar Tabs with Rhythm - Songsterr</a></li>
<li><a href="https://whole30.com/books/it-starts-with-food/">It Starts with Food - The Whole30® Program</a></li>
<li><a href="https://www.linkedin.com/in/bzaczynski/">Bartosz Zaczyński - LinkedIn</a></li>
</ul>
<p>Level up your Python skills with our expert-led courses:</p>
<ul>
<li><a href="https://realpython.com/courses/simulating-processes-simpy/">Simulating Real-World Processes in Python With SimPy</a></li>
<li><a href="https://realpython.com/courses/python-histograms/">Histogram Plotting in Python: NumPy, Matplotlib, Pandas & Seaborn</a></li>
<li><a href="https://realpython.com/courses/playing-and-recording-sound-python/">Playing and Recording Sound in Python</a></li>
</ul> <p><a rel="payment" href="https://realpython.com/join">Support the podcast & join our community of Pythonistas</a></p>
Build a Video Game With Python Turtle & Visualize Data in Seaborn
<p>Can you build a Space Invaders clone using Python’s built-in turtle module? What advantages does the Seaborn data visualization library provide compared to Matplotlib? Christopher Trudeau is back on the show this week, along with special guest Real Python core team member Bartosz Zaczyński. We’re sharing another batch of PyCoder’s Weekly articles and projects.</p>
<p>Bartosz shares a Real Python step-by-step project for building a video game using the Python turtle module. The turtle module provides an interactive environment that lets users create pictures and shapes on a virtual canvas. The project takes you through game design concepts such as animating sprites, detecting a collision, and building a game loop. </p>
<p>We discuss another Real Python resource, “Visualizing Data in Python With Seaborn.” Seaborn is a significant next step if you’ve already been working with Matplotlib. It produces impressive visualizations and offers a functional or object-based approach to designing plots.</p>
<p>We also share several other articles and projects from the Python community, including a news roundup, finding Python Easter eggs, exploring whether Python has pointers, styling Excel cells with OpenPyXL, using weird tests to capture tacit knowledge, inspecting and running Django commands in a TUI, building reactive web UIs in Python, and a project for predictable Python datetimes.</p>
<p>This week’s episode is brought to you by Posit.</p>
<div class="alert alert-primary" role="alert">
<p><strong>Course Spotlight:</strong> <a href="https://realpython.com/courses/python-turtle-beginners/">Python Turtle for Beginners</a> </p>
<p>In this step-by-step course, you’ll learn the basics of Python programming with the help of a simple and interactive Python library called turtle. If you’re a beginner to Python, then this tutorial will definitely help you on your journey as you take your first steps into the world of programming.</p>
</div>
<p>Topics:</p>
<ul>
<li>00:00:00 – Introduction</li>
<li>00:03:06 – Python 3.13.0 alpha 5 is now available</li>
<li>00:03:38 – Allow disabling the GIL with flags</li>
<li>00:04:17 – Django security releases issued: 5.0.3, 4.2.11, and 3.2.25</li>
<li>00:04:32 – The Python Coding Book</li>
<li>00:05:03 – Finding Python Easter Eggs – Code Conversation</li>
<li>00:12:48 – Sponsor: Posit</li>
<li>00:13:34 – Visualizing Data in Python With Seaborn</li>
<li>00:18:18 – Does Python have pointers?</li>
<li>00:21:43 – Build a Python Turtle Game: Space Invaders Clone</li>
<li>00:30:42 – Video Course Spotlight</li>
<li>00:32:04 – Styling Excel Cells with OpenPyXL and Python</li>
<li>00:35:22 – Use weird tests to capture tacit knowledge</li>
<li>00:37:09 – whenever: Strict, predictable, and typed datetimes</li>
<li>00:42:25 – hyperdiv: Build Reactive Web UIs in Python</li>
<li>00:46:19 – django-tui: Inspect and run Django Commands in a TUI</li>
<li>00:48:40 – Thanks and goodbye</li>
</ul>
<p>News:</p>
<ul>
<li><a href="https://pythoninsider.blogspot.com/2024/03/python-3130-alpha-5-is-now-available.html">Python Insider: Python 3.13.0 alpha 5 is now available</a></li>
<li><a href="https://github.com/python/cpython/pull/116338">Allow disabling the GIL with Flags - cpython - GitHub</a></li>
<li><a href="https://www.djangoproject.com/weblog/2024/mar/04/security-releases/">Django security releases issued: 5.0.3, 4.2.11, and 3.2.25 - Weblog - Django</a></li>
<li><a href="https://thepythoncodingplace.com/the-python-coding-book/">The Python Coding Book – The Python Coding Place</a></li>
</ul>
<p>Show Links:</p>
<ul>
<li><a href="https://realpython.com/courses/finding-python-easter-eggs/">Finding Python Easter Eggs – Code Conversation - Video Course</a> – Python has its fair share of hidden surprises, commonly known as Easter eggs. From clever jokes to secret messages, these little mysteries are often meant to be discovered by curious developers like you!</li>
<li><a href="https://realpython.com/python-seaborn/">Visualizing Data in Python With Seaborn</a> – In this tutorial, you’ll learn how to use the Python seaborn library to produce statistical data analysis plots to allow you to better visualize your data. You’ll learn how to use both its traditional classic interface and more modern objects interface.</li>
<li><a href="https://nedbatchelder.com/blog">Does Python have pointers? - Ned Batchelder</a> – Depending on how you’re using the term “pointer” changes the answer to the question. Read on to better understand the programming terminology and whether Python has pointers.</li>
<li><a href="https://realpython.com/build-python-turtle-game-space-invaders-clone/">Build a Python Turtle Game: Space Invaders Clone</a> – In this step-by-step tutorial, you’ll use Python’s turtle module to write a Space Invaders clone. You’ll learn about techniques used in animations and games, and consolidate your knowledge of key Python topics.</li>
<li><a href="https://www.pythonpapers.com/p/styling-excel-cells-with-openpyxl">Styling Excel Cells with OpenPyXL and Python</a> - Many Python libraries that deal with Excel only handle data, but OpenPyXL gives you the ability to style your cells in many different ways. Learn how to give your spreadsheets pizazz!</li>
<li><a href="https://jmduke.com/posts/essays/weird-tests-tacit-knowledge/">Use weird tests to capture tacit knowledge - Applied Cartography</a> – Sometimes adding code in one place means configuration elsewhere also needs to be updated. One way of ensuring this is happening properly in a large project is to use unit tests. This post covers a few examples, complete with pytest code.</li>
</ul>
<p>Projects:</p>
<ul>
<li><a href="https://github.com/ariebovenberg/whenever">whenever: ⏰ Strict, predictable, and typed datetimes</a></li>
<li><a href="https://github.com/hyperdiv/hyperdiv">hyperdiv: Build Reactive Web UIs in Python</a></li>
<li><a href="https://github.com/anze3db/django-tui">django-tui: Inspect and run Django Commands in a text-based user interface (TUI)</a></li>
</ul>
<p>Additional Links:</p>
<ul>
<li><a href="https://realpython.com/zen-of-python/">What’s the Zen of Python? – Real Python</a></li>
<li><a href="https://realpython.com/python-for-data-analysis/">Using Python for Data Analysis – Real Python</a></li>
<li><a href="https://realpython.com/beginners-guide-python-turtle/">The Beginner’s Guide to Python Turtle – Real Python</a></li>
<li><a href="https://roamerrobot.tumblr.com/post/23079345849/the-history-of-turtle-robots">Roamer - The History of Turtle Robots</a></li>
<li><a href="https://openpyxl.readthedocs.io/en/stable/tutorial.html">Tutorial — openpyxl 3.1.2 documentation</a></li>
<li><a href="https://dev.arie.bovenberg.net/blog/python-datetime-pitfalls/">Ten Python datetime pitfalls, and what libraries are (not) doing about it - Arie Bovenberg</a></li>
<li><a href="https://arstechnica.com/features/2024/03/the-science-behind-why-people-hate-daylight-savings-time-so-much/">The science behind why people hate Daylight Saving Time so much - Ars Technica</a></li>
<li><a href="https://textual.textualize.io/">Textual</a></li>
</ul>
<p>Level up your Python skills with our expert-led courses:</p>
<ul>
<li><a href="https://realpython.com/courses/python-histograms/">Histogram Plotting in Python: NumPy, Matplotlib, Pandas & Seaborn</a></li>
<li><a href="https://realpython.com/courses/python-turtle-beginners/">Python Turtle for Beginners</a></li>
<li><a href="https://realpython.com/courses/pointers-python/">Pointers and Objects in Python</a></li>
</ul> <p><a rel="payment" href="https://realpython.com/join">Support the podcast & join our community of Pythonistas</a></p>