Dec 06, 2024 51m
What advice would you give to someone moving from another language to Python? What good programming practices are inherent to the language? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
Episode Sponsor:
We discuss an older forum post from a new Python user who came from Perl. We suggest checking out PEP 8, or as it’s commonly known, “The Style Guide for Python Code.” We provide advice about installing Python, avoiding common pitfalls, learning how scope is managed, and taking advantage of a collection of Real Python resources.
We share several other articles and projects from the Python community, including a new Python release, practical NumPy examples and exercises, considering targets of for loops, exploring Python dependency management, checking package compatibility with free-threading and subinterpreters, an experimental filesystem navigator in Textual, and a background workers reference implementation in Django.
This episode is sponsored by AssemblyAI.
Course Spotlight: Writing Beautiful Pythonic Code With PEP 8
Learn how to write high-quality, readable code by using the Python style guidelines laid out in PEP 8. Following these guidelines helps you make a great impression when sharing your work with potential employers and collaborators. This course outlines the key guidelines laid out in PEP 8. It’s aimed at beginner to intermediate programmers.
Topics:
- 00:00:00 – Introduction
- 00:02:17 – Python 3.14.0 Alpha 2 Released
- 00:02:35 – Take the 2024 Django Developers Survey
- 00:03:17 – NumPy Practical Examples: Useful Techniques
- 00:07:09 – Loop Targets
- 00:09:19 – Python Dependency Management Is a Dumpster Fire
- 00:23:15 – Sponsor: AssemblyAI
- 00:24:00 – Package Compatibility With Free-Threading and Subinterpreters
- 00:27:02 – Suggestions for good programming practices?
- 00:37:59 – Video Course Spotlight
- 00:39:24 – terminal-tree: Experimental Filesystem Navigator in Textual
- 00:43:56 – django-tasks: Background Workers Reference Implementation
- 00:49:44 – Thanks and goodbye
News:
Topics:
- NumPy Practical Examples: Useful Techniques – In this tutorial, you’ll learn how to use NumPy by exploring several interesting examples. You’ll read data from a file into an array and analyze structured arrays to perform a reconciliation. You’ll also learn how to quickly chart an analysis and turn a custom function into a vectorized function.
- Loop Targets – Loop assignment allows you to assign to a dict item in a
for
loop. This post covers what that means and that it is no more costly than regular assignment. - Python Dependency Management Is a Dumpster Fire – Managing dependencies in Python can be a bit of a challenge. This deep dive article shows you all the problems and how the problems are mitigated if not solved.
- Package Compatibility With Free-Threading and Subinterpreters – This tracker tests the compatibility of the 500 most popular packages with Python 3.13’s free-threading and subinterpreter features.
Discussion:
Projects:
Additional Links: