Issue #659

Handling Errors, PyPy Performance, Chat Interface to Wikipedia, and More

Dec. 10, 2024

Handling Errors, PyPy Performance, Chat Interface to Wikipedia, and More
#659 – DECEMBER 10, 2024 VIEW IN BROWSER
The PyCoder’s Weekly Logo
Handling or Preventing Errors in Python: LBYL vs EAFP
In this video course, you’ll learn about two popular coding styles in Python: look before you leap (LBYL) and easier to ask forgiveness than permission (EAFP). You can use these styles to deal with errors & exceptional situations in your code. You’ll dive into the LBYL vs EAFP discussion in Python.
REAL PYTHON course

Assessing PyPy Performance With π and Prime Numbers
An exploration of PyPy, an alternative Python implementation written in Python, is performed through two computational tasks: estimating π using the Monte Carlo method and calculating prime numbers with the Sieve of Eratosthenes.
CRISTIANOPIZZAMIGLIO.COM • Shared by Cristiano Pizzamglio

Posit Connect Cloud: Share the Work You Make With Streamlit, FastAPI, Shiny & Other FOSS Frameworks
Posit Connect Cloud allows users to publish, host, and manage interactive apps, dashboards, Python models, APIs, and more. It offers a centralized, self-service platform for sharing Python-based data science. Amplify your impact by streamlining deployment and fostering sharing and collaboration →
POSITsponsor

Building a Chat Backend for Wikipedia Articles in Django
This step-by-step article covers how to build a scalable chat backend using Django, Wikipedia data, OpenAI embeddings, and FAISS.
YANN MALET

PyCon US 2025 (Pittsburgh, PA) Registration Open
PYCON.BLOGSPOT.COM

Django Security Releases Issued: 5.1.4, 5.0.10, and 4.2.17
DJANGO SOFTWARE FOUNDATION

Python 3.13.1, 3.12.8, 3.11.11, 3.10.16 and 3.9.21 Released
CPYTHON DEV BLOG

PyCon Austria 2025 (Eisenstadt) Call for Papers
PAPERCALL.IO

Quiz: Expression vs Statement in Python
REAL PYTHON


Articles & Tutorials


Expression vs Statement in Python: What’s the Difference?
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.
REAL PYTHON

Transferring Python Build Standalone Stewardship to Astral
Gregory is the maintainer of the Python Standalone Builds project but due to changes in his life doesn’t have as much time to contribute. The folks at Astral have offered to take the project on. This note explains why.
GREGORY SZORC

Python Developers: Scrape Any Website Without Getting Blocked
ZenRows handles all anti-bot bypass for you, from rotating proxies and headless browsers to CAPTCHAs and AI. Get a complete web scraping toolkit to extract all the data you need with a single API call. Try ZenRows now for free →
ZENROWSsponsor

New Era of Slop Security Reports for Open Source
Seth is the go-to security guy at Python and other open source projects. He, and others, have noticed an increase in automatically generated security reports which are often wrong. This post talks about what is going on and what you can do it if you maintain your own repository.
SETH LARSON

PEP 767: Annotating Read-Only Attributes
PEP 705 introduced the typing.ReadOnly type qualifier to allow defining read-only typing.TypedDict items. This PEP proposes using ReadOnly in annotations of class and protocol attributes, as a single concise way to mark them read-only.
PYTHON.ORG

PyData NYC 2024 Talks Available
This is a list of the talks from PyData NYC 2024. Topics include “Explaining Machine Learning Models with LLMS”, ” Using NASA EarthData Cloud & Python to Model Climate Risks”, “Unlocking the Power of Hybrid Search”, and more.
YOUTUBE.COM video

PEP 766: Explicit Priority Choices Among Multiple Indexes
“Package resolution is a key part of the Python user experience as the means of extending Python’s core functionality.” This PEP covers how package indexes should be merged as a spec for package management tools.
PYTHON.ORG

Testing Some Tidbits
Ned needed a way to check if a string consisted entirely of zeros and ones. He posted some possible answers and got a bunch more back in return. This post shows all the answers and how he validated them.
NED BATCHELDER

PyCon Australia 2024 Videos Released
This is a collection of the talks from PyCon Australia 2024. Topics include “How Smart is AI?”, “Three Django Apps in a Trenchcoat”, “Rethinking Data Catalogs”, and more.
YOUTUBE.COM video

Staff Engineer vs Engineering Manager
When do you need a Staff Engineers? What’s the difference between Staff Engineer and Engineering Manager? This article covers these questions and more.
ALEX EWERLÖF

Disposable Environments for Ad-Hoc Analyses
This article talks about juv, a tool that builds on top of uv and brings better environment management to Jupyter notebooks.
ERIC J. MA


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 →

Python Implementation of MCP
PYPI.ORG

pandera: Statistical Data Testing Library
GITHUB.COM/UNIONAI-OSS

Potnia: Convert Ancient Texts Into Unicode
GITHUB.COM/ANCIENTNLP • Shared by Anonymous

Use Pyton 3.13 REPL With Django Shell
GITHUB.COM/SELECTNULL • Shared by Sasha Matijasic

leopards: Query Your Python Lists
GITHUB.COM/MKALIOBY

📆🐍 Upcoming Python Events


Weekly Real Python Office Hours Q&A (Virtual)
December 11, 2024

Python Atlanta
December 13, 2024

PyDelhi User Group Meetup
December 14, 2024

DFW Pythoneers 2nd Saturday Teaching Meeting
December 14, 2024

Inland Empire Python Users Group Monthly Meeting
December 18, 2024
Happy Pythoning!
Copyright © 2024 PyCoder’s Weekly, All rights reserved.