CTRL-C, Exceptions, Ruff Speed-up, and More

#626 โ€“ APRIL 23, 2024 VIEW IN BROWSER
The PyCoder’s Weekly Logo
Asyncio Handle Control-C (SIGINT)
When the user presses CTRL-C on the keyboard, the OS raises an interrupt signal to your program. When writing concurrent code this can get complicated as the signal goes to the process. This article shows you how to handle capturing CTRL-C elegantly when using asyncio.
JASON BROWNLEE

Using raise for Effective Exceptions
In this video course, you’ll learn how to raise exceptions in Python, which will improve your ability to efficiently handle errors and exceptional situations in your code. This way, you’ll write more reliable, robust, and maintainable code.
REAL PYTHON course

Securing Python and Open Source Ecosystems
Join this fireside chat featuring Dustin Ingram, Fellow at the Python Software Foundation (PSF), as we discuss trust and security for PyPI and other repositories in light of recent attacks, and initiatives such as Trusted Publishing - Tune in this Thursday! โ†’
ACTIVESTATEsponsor

Ruff Gets a Big Speed-Up
Ruff has changed from a generated parser to a hand-written recursive descent parser in the latest release. This has resulted in >2x speedup in its linting performance. This article covers what has changed and why they did it.
DHRUV MANILAWALA

Quiz: Managing Multiple Python Versions With pyenv
REAL PYTHON


Articles & Tutorials


OpenStreetMaps, Overpass API and Python
OpenStreetMaps (OSM) is an an open source mapping project that allows people to browse the world map and to plan routes. Not only does it have the expected web interface, but it also has an API known as Overpass. This article shows you two ways to use Python to query Overpass.
JUDITH VOCKENROTH

Python Gotcha: strip Can Remove More Than Expected
The Python strip, lstrip, and rstrip functions can have unexpected behavior: they strip a list of characters, not strings. Even though this is documented, it can lead to unexpected results. This post explains what happens and shows you two functions to use instead.
ANDREW WEGNER

Decoupling Systems to Get Closer to the Data
What are the benefits of using a decoupled data processing system? How do you write reusable queries for a variety of backend data platforms? This week on the show, Phillip Cloud, the lead maintainer of Ibis, will discuss this portable Python dataframe library.
REAL PYTHON podcast

Announcing py2wasm: A Python to Wasm Compiler
Wasmer, a company that builds Wasm tools, has announced py2wasm which converts your Python programs to WebAssembly, running at 3x faster speeds than direct Wasm. This post introduces you to the tool and shows how they took advantage of the Nuitka library.
SYRUS AKBARY

How to Format Floats Within F-Strings in Python
In this tutorial, you’ll learn how to use Python format specifiers within an f-string to allow you to neatly format a float to your required precision. You’ll also learn how to extract digits from existing strings and format them as well.
REAL PYTHON

Memory Management in mpmetrics
The mpmetrics library contains tools for determining runtime metrics on your code. To do this it requires some esoteric memory management techniques normally not undergone in Python. This post describe what they’ve done and why.
TRENDS BLOG

The Time Complexities Python Data Structures in Python
Big O notation describes the relationship between an algorithm, how much data it is using, and the time it takes to run. This article covers the time complexities of a variety of Python data structures.
TREY HUNNER

Django Project on NGINX Unit
Unit is a web server developed by the NGINX folks with pluggable support for Python using WSGI and ASGI. Aidas tried it out and this post talks about how he got some Django code working on this server.
AIDAS BENDORAITIS

I Asked 100 Devs Why They Aren’t Shipping Faster?
Daksh asked 100 developers why they aren’t shipping faster and this blog post shares what he learned. Problems include dependency bugs, overly complicated code bases, waiting on requirements, and more.
DAKSH GUPTA

Shape Typing in Python
This quick blog post shows you how to use Python type checking to ensure the dimensions of matrices being multiplied together. Typing is no longer just “is it an integer”.
JAMES FISHER

Software Needs to Be More Expensive
Open source is free, and although that is a good thing, it also means companies get to take without giving back. This opinion piece talks about how that should change.
GLYPH LEFKOWITZ


Projects & Code


Brought to you by Real Python for Teamssponsor
Online Python training created by a community of experts. Give your team the real-world Python skills they need to succeed โ†’

Master Python With Spaced Repetition
PYTHON CARDS

automathon: Simulate and Visualize Finite Automata
GITHUB.COM/ROHAQUINLOP

stamina: Production-Grade Retries for Python
GITHUB.COM/HYNEK

tenacity: Retrying Library for Python
GITHUB.COM/JD

auto_venv: Say Goodbye to Manual Setup or Install
GITHUB.COM/AMAL-KHAILTASH

escaping: Suppress Exceptions With Callbacks and Logs
GITHUB.COM/POMPONCHIK โ€ข Shared by Evgeniy Blinov

๐Ÿ“†๐Ÿ Upcoming Python Events


Weekly Real Python Office Hours Q&A (Virtual)
April 24, 2024

SPb Python Drinkup
April 25, 2024

Django Girls Ekpoma Workshop
April 26 to April 28, 2024

Open Source With Python
April 27, 2024

PythOnRio Meetup
April 27, 2024

Launching Python Niger
April 28 to April 29, 2024
Happy Pythoning!
Copyright ยฉ 2024 PyCoder’s Weekly, All rights reserved.
You are receiving this email because you opted in on our website at pycoders.com
Our mailing address: DevCademy Media Inc. ยท #720-999 West Broadway, Vancouver BC V5Z 1K5, Canada

Unsubscribe | Update Email Address

Older messages

Pydantic, Web Security, State of Python, and More

Tuesday, April 16, 2024

Pydantic: Simplifying Data Validation in Python #625 – APRIL 16, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo Pydantic: Simplifying Data Validation in Python Discover the power of Pydantic,

Inline Dependencies, pipx, Multiplying Sequences, and More

Tuesday, April 9, 2024

Install and Execute Python Applications Using `pipx` #624 – APRIL 9, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo Install and Execute Python Applications Using pipx In this tutorial, you'll

WAV Files, Reflex, Autopilot, and More

Tuesday, April 2, 2024

Reading and Writing WAV Files in Python #623 – APRIL 2, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo Reading and Writing WAV Files in Python In this tutorial, you'll learn how to work with

Space Invaders, Using help(), Every Dunder Method, and More

Tuesday, March 26, 2024

Build a Python Turtle Game: Space Invaders Clone #622 – MARCH 26, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo Build a Python Turtle Game: Space Invaders Clone In this step-by-step tutorial, you

Seaborn, Pointers, Memory, and More

Tuesday, March 19, 2024

Visualizing Data in Python With Seaborn #621 – MARCH 19, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo Visualizing Data in Python With Seaborn In this tutorial, you'll learn how to use the

You Might Also Like

Laravel VS Code Extension, Laravel 11.36, Wirechat, and more! - №544

Sunday, December 22, 2024

Your Laravel week in review ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Kotlin Weekly #438

Sunday, December 22, 2024

ISSUE #438 22nd of December 2024 Announcements klibs.io JetBrains has introduced the alpha version of klibs.io – a web service that speeds up and simplifies discovering KMP libraries that best meet

Weekend Reading — Happy "That's a January Problem" week

Saturday, December 21, 2024

Can Christmas season start a little earlier this year Tech Stuff Ramsey Nasser fuck it happened i am in a situation where i do actually need to reverse a linked list Atuin I just learned about Atuin

Daily Coding Problem: Problem #1644 [Easy]

Saturday, December 21, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by IBM. Given an integer, find the next permutation of it in absolute order. For example,

🐧 Whatever Happened to Unix Workstations? — My Incredibly Cheap Alternative to a Soundbar

Saturday, December 21, 2024

Also: Here's Why More Games Need Expanded Difficulty Settings How-To Geek Logo December 21, 2024 Did You Know Lake Wendouree, an artificially created and maintained shallow urban lake in Australia,

Supercharge Your Knowledge Capture Workflow with the Obsidian Web Clipper

Saturday, December 21, 2024

Stop juggling multiple tools and supercharge your knowledge capture workflow with Obsidian's powerful Web Clipper browser extension Sébastien Dubois DeveloPassion's Newsletter Supercharge Your

Charted | The World's Most Valuable Automakers 🚙

Saturday, December 21, 2024

Tesla shares reached a record high, setting a new valuation milestone. This graphic highlights the world's most valuable automakers by market cap. View Online | Subscribe | Download Our App

Next Holiday Season, Ignore Everyone Except One Customer

Saturday, December 21, 2024

Top Tech Content sent at Noon! Boost Your Article on HackerNoon for $159.99! Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, December 21, 2024? The

🐍 New Python tutorials on Real Python

Saturday, December 21, 2024

Hey there, There's always something going on over at Real Python as far as Python tutorials go. Here's what you may have missed this past week: 🎓 Master Python's Core Principles (New Live

Post from Syncfusion Blogs on 12/21/2024

Saturday, December 21, 2024

New blogs from Syncfusion ASP.NET MVC Suite Update: Aligning with .NET Changes By Rajendran R Discover key updates in our ASP.NET MVC suite, aligning with Microsoft's latest .NET changes for