
The Real Python Podcast· Folge 247
Exploring DuckDB & Comparing Python Expressions vs Statements
Freitag, 18. April 2025 · 52 min
Kapitelklicken springt direkt hin
Shownotes
<p>Are you looking for a fast database that can handle large datasets in Python? What’s the difference between a Python expression and a statement? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.</p>
<p>We cover a Real Python article that explores DuckDB and discuss creating a database by reading data from multiple file formats. When building queries, DuckDB uses standard SQL syntax, or for an object-oriented approach, you can chain methods together using the Python API. We also explore the advantages of lazy evaluation using DuckDB relations.</p>
<p>Christopher digs into another Real Python tutorial that covers the differences between expressions and statements in Python. The piece goes beyond definitions to answer questions about where and when to use them in your code.</p>
<p>We also share several other articles and projects from the Python community, including a news roundup, an investigation into the lack of security in MCP, a discussion on the differences between staff engineer and engineering manager roles, guidance on creating and modifying Word documents with Python, and a project to go beyond print for debugging your code.</p>
<p>Check out <a href="realpython.com/workshops"><strong&g…; to join the upcoming cohort of the Intermediate Python Deep Dive course.</p>
<div class="alert alert-primary" role="alert">
<p><strong>Course Spotlight:</strong> <a href="realpython.com/courses/creating-dice-roll-appl… a Python Dice Roll Application</a></p>
<p>In this step-by-step video course, you’ll build a dice-rolling simulator app with a minimal text-based user interface using Python. The app will simulate the rolling of up to six dice. Each individual die will have six sides.</p>
</div>
<p>Topics:</p>
<ul>
<li>00:00:00 – Introduction</li>
<li>00:02:24 – Python 3.14.0a7, 3.13.3, 3.12.10, 3.11.12, 3.10.17 and 3.9.22 are now available</li>
<li>00:02:47 – PEP 768: Safe External Debugger Interface for CPython (Accepted)</li>
<li>00:03:16 – PEP 781: Make TYPE_CHECKING a Built-in Constant</li>
<li>00:03:43 – PEP 750: Template Strings (Accepted)</li>
<li>00:04:15 – PEP 751: A file format to record Python dependencies for installation reproducibility (Accepted)</li>
<li>00:05:20 – EuroPython July 14th-20th Prague, Tickets Available</li>
<li>00:05:42 – Django 5.2 Released</li>
<li>00:05:59 – Django security releases issued: 5.1.8 and 5.0.14</li>
<li>00:06:19 – Introducing DuckDB</li>
<li>00:12:19 – Expression vs Statement in Python: What’s the Difference?</li>
<li>00:17:11 – Video Course Spotlight</li>
<li>00:18:33 – The “S” in MCP Stands for Security</li>
<li>00:28:08 – Real Python Workshops</li>
<li>00:30:26 – Staff Engineer vs Engineering Manager</li>
<li>00:44:48 – python-docx: Create and modify Word documents with Python</li>
<li>00:47:28 – peek: like print, but easy</li>
<li>00:50:32 – Thanks and goodbye</li>
</ul>
<p>News:</p>
<ul>
<li><a href="pythoninsider.blogspot.com/2025/04/python-3140… 3.14.0a7, 3.13.3, 3.12.10, 3.11.12, 3.10.17 and 3.9.22 are now available</a></li>
<li><a href="peps.python.org/pep-0768/">PEP 768: Safe External Debugger Interface for CPython (Accepted)</a></li>
<li><a href="peps.python.org/pep-0781/">PEP 781: Make TYPE_CHECKING a Built-in Constant</a> – This PEP proposes adding a new built-in variable, TYPE_CHECKING, which is True when the code is being analyzed by a static type checker, and False during normal runtime.</li>
<li><a href="peps.python.org/pep-0750/">PEP 750: Template Strings (Accepted)</a> – This PEP introduces template strings for custom string processing.</li>
<li><a href="peps.python.org/pep-0751/">PEP 751: A file format to record Python dependencies for installation reproducibility (Accepted)</a></li>
<li><a href="ep2025.europython.eu/tickets/">EuroPyt… July 14th-20th Prague, Tickets Available</a></li>
<li><a href="djangoproject.com/weblog/2025/apr/02/django-52… 5.2 Released</a></li>
<li><a href="djangoproject.com/weblog/2025/apr/02/security-… security releases issued: 5.1.8 and 5.0.14</a></li>
</ul>
<p>Topics:</p>
<ul>
<li><a href="realpython.com/python-duckdb/">Introdu… DuckDB</a> – In this showcase tutorial, you’ll be introduced to a library that allows you to use a database in your code. DuckDB provides an efficient relational database that supports many features you may already be familiar with from more traditional relational database systems.</li>
<li><a href="realpython.com/python-expression-vs-statement/… vs Statement in Python: What’s the Difference?</a> – In this tutorial, you’ll explore the differences between an expression and a statement in Python. You’ll learn how expressions evaluate to values, while statements can cause side effects. You’ll also explore the gray areas between them, which will enhance your Python programming skills.</li>
<li><a href="elenacross7.medium.com/%EF%B8%8F-the-s-in-mcp-… “S” in MCP Stands for Security - Elena Cross</a> – Model Context Protocol is a new standard behind how Large Language Models integrate with tools and data. Unfortunately, MCP is not secure by default.</li>
<li><a href="blog.alexewerlof.com/p/staff-engineer-vs-engin… Engineer vs Engineering Manager - Alex Ewerlöf Notes</a> – When do you need a Staff Engineers? What’s the difference between Staff Engineer and Engineering Manager? This article covers these questions and more.</li>
</ul>
<p>Projects:</p>
<ul>
<li><a href="github.com/python-openxml/python-docx">…: Create and modify Word documents with Python</a></li>
<li><a href="salabim.org/peek/">peek: like print, but easy</a></li>
</ul>
<p>Additional Links:</p>
<ul>
<li><a href="realpython.com/workshops/intermediate-deep-div… Python Deep Dive Course – Real Python</a></li>
<li><a href="realpython.com/podcasts/rpp/227/">Epis… #227: New PEPs: Template Strings & External Wheel Hosting</a></li>
<li><a href="duckdb.org/">DuckDB – An in-process SQL OLAP database management system</a></li>
<li><a href="en.wikipedia.org/wiki/Online_analytical_proces… analytical processing - Wikipedia</a></li>
<li><a href="simonwillison.net/2025/Apr/9/mcp-prompt-inject… Context Protocol has prompt injection security problems</a></li>
<li><a href="modelcontextprotocol.io/introduction">… Context Protocol - Documentation</a></li>
<li><a href="github.com/modelcontextprotocol/python-sdk&quo…: The official Python SDK for Model Context Protocol servers and clients</a></li>
<li><a href="bsky.app/profile/oregonthedm.bsky.social/post/… commitment to a 3 second joke I’ve ever seen” — Bluesky</a></li>
</ul>
<p>Level up your Python skills with our expert-led courses:</p>
<ul>
<li><a href="realpython.com/courses/python-debugging-pdb/&q… in Python With pdb</a></li>
<li><a href="realpython.com/courses/python-assignment-expre… Assignment Expressions and Using the Walrus Operator</a></li>
<li><a href="realpython.com/courses/creating-dice-roll-appl… a Python Dice Roll Application</a></li>
</ul> <p><a rel="payment" href="realpython.com/join">Support the podcast & join our community of Pythonistas</a></p>