How do you know you’re using the correct data structure for your Python project? There are so many built into Python and even more that are importable from the collections module. This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects. We discuss a recent three-part video course on selecting the ideal data structure.
Along with comparing the types of dictionaries, data records, arrays, stacks, and more, David covers a recent Real Python article about the namedtuple. This deep dive covers how to use the namedtuple to write cleaner code.
We also discuss new articles from previous guest Brett Cannon. He has added two posts to his Python syntactic sugar series about unravelling the pass and with statement.
We cover several other articles and projects from the Python community including, async in Flask 2.0, Python projects on Github that are examples of best practices and good architecture, how SpaceX sort of lands starship, the new ti-84 calculator with Python, and building a Python spell checker.
Spotlight: Stacks and Queues: Selecting the Ideal Data Structure
In this course, you’ll learn about three of Python’s data structures: stacks, queue and priority queues. You’ll look at multiple types and classes for all of these and learn which implementations are best for your specific use cases.
00:00:00 – Introduction00:02:06 – Write Pythonic and Clean Code With namedtuple00:05:38 – Unravelling the pass Statement00:10:31 – Unravelling the with statement00:13:38 – Async in Flask 2.000:19:04 – Sponsor: Digital Ocean’s App Platform00:19:40 – Python Projects on Github That Are Examples of Best Practices and Good Architecture00:26:43 – How SpaceX Lands Starship (Sort Of)00:32:00 – Stacks and Queues: Selecting the Ideal Data Structure00:38:34 – Video Course Spotlight00:40:39 – Texas Instruments To Release New TI-84 Calculator With Python00:44:23 – spylls: Python spell checker00:47:36 – Thanks and goodbyeWrite Pythonic and Clean Code With namedtuple – In this step-by-step tutorial, you’ll learn what Python’s namedtuple is and how to use it in your code. You’ll also learn about the main differences between named tuples and other data structures, such as dictionaries, data classes, and typed named tuples.
Unravelling the pass Statement – When you need to indicate that a bit of code intentionally does nothing, then you need to reach for Python’s pass statement. In the latest installment of Brett’s “Syntactic Sugar” series, you’ll learn how pass works, when to use it, and why it’s a uniquely Python concept.
Unravelling the with statement
Async in Flask 2.0 – This article looks at Flask 2.0’s new async functionality and how to leverage it in your Flask projects. You’ll learn how Flask processes requests asynchronously using a traditional WSGI server, instead of the ASGI server used by many other async web frameworks. You’ll also learn how to simulate Flask 2.0 async in Flask 1.X applications.
Python Projects on Github That Are Examples of Best Practices and Good Architecture – This Reddit thread is full of GitHub repos that might make for some good code reading.
How SpaceX Lands Starship (Sort Of) – While waiting for SN15 to launch, Thomas Goddard set out to pull together a 2-dimensional simulation of the Starship landing. Tying together knowledge of trajectory optimization, Thomas modeled the landing in Python with the CasADI library and used Matplotlib to generate an animation which, when played side-by-side with the footage of the landing, results in remarkable similarity to the actual landing dynamics.
Stacks and Queues: Selecting the Ideal Data Structure – Learn about three of Python’s data structures: stacks, queue and priority queues. You’ll look at multiple types and classes for all of these and learn which implementations are best for your specific use cases.
Texas Instruments To Release New TI-84 Calculator With PythonspyllsEpisode 47: Unraveling Python’s Syntax to Its Core With Brett CannonResource acquisition is initialization (RAII) - Wikipedia ArticleThe Social Contract of Open Sourceimport asyncio: Learn Python’s AsyncIO #1 - The Async Ecosystem – YouTubeDavid Lord’s Twitter Thread on Adding Type Annotations for Pallets Projects Episode 9: Leveling Up Your Python Literacy and Finding Python Projects to Study With Cecil Philliprequests: A simple, yet elegant, HTTP libraryPython Application Layouts: A Reference – Real Python ArticleWily: A command-line application for tracking, reporting on complexity of Python tests and applicationsERPNext: Free and open source ERPKitsune: Mozilla platform that powers SuMo (support.mozilla.org)Black: The uncompromising code formatterThe Architecture of Open Source ApplicationsThe Hitchhiker’s Guide to Python: Reading Great CodeEpisode 27: Preparing for an Interview With Python Practice Problems With Jim AndersonCommon Python Data Structures (Guide) – Real Python ArticlePython Stacks, Queues, and Priority Queues in Practice – Real Python ArticleDo You Use the Python Console and the Python Math Libraries as a Calculator? I Forgot How to SpellcheckhunspellLevel up your Python skills with our expert-led courses:
Records and Sets: Selecting the Ideal Data StructureStacks and Queues: Selecting the Ideal Data StructureDictionaries and Arrays: Selecting the Ideal Data Structure Support the podcast & join our community of Pythonistas