Issue #627

PEP 686, Lazy Evaluation, Serverless Python, and More

April 30, 2024

PEP 686, Lazy Evaluation, Serverless Python, and More
#627 – APRIL 30, 2024 VIEW IN BROWSER
The PyCoder’s Weekly Logo
PEP 686: Make UTF-8 Mode Default
This Python Enhancement Proposal outlines making UTF-8 the default throughout Python. This takes the addition of Unicode introduced in Python 3 to its full extent, applying it to file encoding, pipes, and more. Mechanisms for other encoding are still supported. This PEP is targeted for Python 3.15.
PEPS

What’s Lazy Evaluation in Python?
This tutorial explores lazy evaluation in Python and looks at the advantages and disadvantages of using lazy and eager evaluation methods. By the end of this tutorial, you’ll clearly understand which approach is best for you, depending on your needs.
REAL PYTHON

Build Your Own AI CLI Agent with Open Source by Pieces (OSP)
Unlock the power of Pieces, right in your terminal! Our open-source CLI plugin helps you manage code snippets, chat with your on-device AI copilot, and even auto-generate commit messages. Join our community to refine your Python skills and influence a product used by 1000s of devs. Contribute today →
PIECESsponsor

Serverless Python in 2024
Talk Python interviews Tony Sherman and they discuss the current state of serverless computing in the Python world, including some of the newer tools and best practices.
KENNEDY & SHERMAN podcast

Django Developers Survey 2023 Results
JETBRAINS

Djangonauts Space Session 2 Applications Open!
DJANGONAUTS

PyPy v7.3.16 Release
PYPY

PEP 745: Python 3.14 Release Schedule
PEPS

Quiz: Writing Unit Tests for Your Code With unittest
REAL PYTHON


Discussions


High Quality Python Scripts or Small Libraries to Learn From?
HACKER NEWS


Articles & Tutorials


Filter Sensitive Contents From Django’s Error Reports
Django has the ability to automatically email admins when a 500 error occurs. These kinds of errors can potentially contain sensitive information though, so there are decorators to hide these values. This post covers those as well as how to filter data when using Sentry.
GONÇALO VALÉRIO

Asyncio Coroutine Object Methods in Python
The async and await keywords that form Python’s coroutine mechanism can be used for class methods as well as the more common case of functions. This article shows you how you can use asyncio with your objects.
JASON BROWNLEE

How to Prevent Data Leakage in pandas & scikit-learn
How you impute missing values in machine learning data sets can effect the quality of your training. This article teaches you what data leakage is and what steps you should take to avoid it.
DATASCHOOL

An Open Letter Regarding the DjangoCon Europe CfP
Putting on a conference is a complex matter and an attempt to clarify how future DjangoCons in Europe would be structured has resulted in push-back. This open letter is by a Django board member explaining the situation and a hope of how to move forward.
DJANGO SOFTWARE FOUNDATION

Python Basics: Lists and Tuples
In this video course, you’ll learn about Python lists and tuples, including how to define and manipulate them in your code. By the end of the course, you’ll be ready to effectively use lists and tuples in your programming projects.
REAL PYTHON course

Don’t Lie in Interviews
This strongly worded opinion piece by Nat is in reaction to common advice given on Reddit and similar boards. Nat counters it all with “don’t lie in interviews”. Strong language warning.
NAT BENNETT

Fake Job Interviews Target Devs With New Python Backdoor
“A new campaign tracked as “Dev Popper” is targeting software developers with fake job interviews in an attempt to trick them into installing a Python remote access trojan (RAT).”
BILL TOULAS

Why You Need a “WTF Notebook”
There’s a very specific reputation Nat wants to have on a team: “Nat helps me solve my problems. Nat get things I care about done.” Keeping a WTF notebook helps him do just that.
NAT BENNETT

Write Unit Tests for Your Python Code With ChatGPT
In this tutorial, you’ll learn how to use ChatGPT to generate tests for your Python code. You’ll use the chat to create doctest, unittest, and pytest tests for your code.
REAL PYTHON

Leibniz Formula for Π in Python, JavaScript, and Ruby
This is a bare-bones, side-by-side comparison of the Leibniz formula for calculating pi in Python, JavaScript, and Ruby, along with performance measurements.
PETER BENGTSSON

Better Test Parametrisation in pytest
This “Things I’ve Learned” post discusses how to take advantage of test parameterisation in pytest.
RODRIGO GIRÃO SERRÃO


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 →

All Python 2023 Conference Talks Google Sheet
HH91

zpy: ZSH Helpers for Python Venvs, With Uv or Pip-Tools
GITHUB.COM/ANDYDECLEYRE

django-typescript-routes: Typescript Routes From a URL Conf
GITHUB.COM/BUTTONDOWN

pipxu: Install in Isolated Environments Using UV
GITHUB.COM/BULLETMARK

PyOptInterface: Interface for Mathematical Optimization
GITHUB.COM/METAB0T

📆🐍 Upcoming Python Events


Weekly Real Python Office Hours Q&A (Virtual)
May 1, 2024

Canberra Python Meetup
May 2, 2024

Sydney Python User Group (SyPy)
May 2, 2024

TOUFU
May 4 to May 5, 2024

PyDelhi User Group Meetup
May 4, 2024

Melbourne Python Users Group, Australia
May 6, 2024
Happy Pythoning!
Copyright © 2024 PyCoder’s Weekly, All rights reserved.