The discussion kicks off with the intriguing topic of loop targets, showcasing a unique code snippet that sparks debate on readability. They dive into async innovations and the 'Bagels' project, emphasizing creative coding and time management. Personal coding adventures and social media engagement take center stage, with reflections on platforms like Blue Sky versus Mastodon. The humor flows as they share amusing programming and interview anecdotes, making the technical details more relatable and enjoyable.
The podcast discusses the debate around loop targets in Python, emphasizing the balance between readability and compactness in coding practices.
It introduces 'Bagels,' a beginner-friendly expense tracker project that aids developers in learning database management through practical application.
Deep dives
Controversy Over Loop Targets
A discussion emerges regarding the use of loop targets in Python, specifically about how to assign values in a for loop effectively. Ned Batchelder's blog post sparks debate over whether a temporary variable for pagination, such as 'page_num', should be used to enhance readability or if direct assignment within the loop is sufficient. Proponents of the temporary variable argue that it increases clarity by explicitly defining what the variable represents, while opponents see it as unnecessary overhead. The conversation reflects a broader trend of opinions on coding practices, reminiscent of the ongoing debates around features like the walrus operator.
Async Standard Library Deficiencies
There is a notable lack of support for asynchronous programming in Python's standard library, particularly in tools like itertools and functools. This gap leads to a proposal for an asynchronous version of these libraries to better serve developers working with async functions. The discussion highlights how existing decorators and functions, such as lru_cache, need to be adapted for asynchronous use, which can be cumbersome without dedicated tools. A new async standard library aims to bridge this gap, providing developers with familiar functionalities designed specifically for async programming.
Enhanced Jack: An Expense Tracker Project
The podcast introduces 'Bagels,' a new expense tracker application built using Textual, aimed at developers looking for beginner-friendly projects. This command-line application allows users to manage multiple accounts and features clear installation instructions, enhancing accessibility for new users. The project's roadmap and testing setup demonstrate a focus on community involvement and iterative improvement. With its use of SQL Alchemy, 'Bagels' serves as a practical project for those wanting to learn about managing databases within Python applications.
Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too.
Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.
The asyncstdlib library re-implements functions and classes of the Python standard library to make them compatible with async callables, iterables and context managers.
It is fully agnostic to async event loops and seamlessly works with asyncio, third-party libraries such as trio, as well as any custom async event loop.
Full set of async versions of advantageous standard library helpers, such as zip, map, enumerate, functools.reduce, itertools.tee, itertools.groupby and many others.
Safe handling of async iterators to ensure prompt cleanup, as well as various helpers to simplify safely using custom async iterators.
Small but powerful toolset to seamlessly integrate existing sync code into async programs and libraries.
“Bagels expense tracker is a TUI application where you can track and analyse your money flow, with convenience oriented features and a complete interface.
Why an expense tracker in the terminal? I found it easier to build a habit and keep an accurate track of my expenses if I do it at the end of the day, instead of on the go. So why not in the terminal where it's fast, and I can keep all my data locally?”
Who hasn’t wanted to write their own expense tracker?
This implementation is fun for lots of reasons
It’s still new and pretty small, so forking it for your own uses should be easy
Built on textual is fun
install instructions based on uv tool seems to be the new normal:
uv tool install --python 3.13 bagels
test suite started
pretty useful as is, actually
Nice that it includes a roadmap of future goals
Would be a fun project to help out with for anyone looking for anyone looking for a shiny new codebase to contribute to.
Michael #4:rloop: An AsyncIO event loop implemented in Rust
An AsyncIO event loop implemented in Rust
From Giovanni Barillari, Creator of Granian
RLoop is an AsyncIO event loop implemented in Rust on top of the mio crate.
Disclaimer: This is a work in progress and definitely not ready for production usage.
Run asyncio.set_event_loop_policy(rloop.EventLoopPolicy()) and done.