PEP 646 Accepted, Strict Function Parameters, Solving Wordle, and More

#509 – JANUARY 25, 2022 VIEW IN BROWSER
The PyCoder’s Weekly Logo
PEP 646: Variadic Generics Was Accepted
This PEP introduces TypeVarTuple, enabling parameterisation with an arbitrary number of types. For example, it allows the type of array-like structures in numerical computing libraries such as NumPy and TensorFlow to be parameterised with the array shape, enabling static type checkers to catch shape-related bugs. The PEP was recently accepted by the Steering Council.
PYTHON.ORG

Build a Dice-Rolling Application With Python
In this step-by-step project, you’ll build a dice-rolling simulator app with a minimal text-based user interface using Python. The app will simulate the rolling of up to six dice. Each individual die will have six sides.
REAL PYTHON

How to Quickly Label Data for Machine Learning
With Toloka, you can control the accuracy and speed of data labeling to develop high performing ML models. Our platform supports annotation for image classification, semantic segmentation, object detection, named entity recognition, sentiment analysis, speech recognition, text classification →
TOLOKA AIsponsor

PEP 679: Allow Parentheses in assert Statements
“It is a common user mistake when using the form of the assert statement that includes the error message to surround it with parentheses. Unfortunately, this mistake passes undetected as the assert will always pass, because it is interpreted as an assert statement where the expression is a two-tuple, which always has truth-y value.”
PYTHON.ORG

Strict Python Function Parameters
Learn about keyword-only and positional-only parameters and see how using strict function signatures can help you write more resilient code.
SETH MICHAEL LARSON

Guiding Design Principles for Scientific Python
Tips on how to design and organize scientific Python code.
NSLS-II.GITHUB.IO


Python Jobs


Senior Full-Stack Web Developer (Anywhere)
MONETIZEMORE

Python Engineer (Web Scraping) (Asia, TX, America)
NEWSCATCHER

PyCoder's Weekly Curator and Podcast Co-Host (Anywhere)
REAL PYTHON

Senior Software Engineer (Anywhere)
BREW

More Python Jobs >>>


Articles & Tutorials


Designing for Users and Building a Social Network With Django
Are you looking for a project to practice your Django skills? Designing the fundamental interactions of a social network is an instructive way to explore models and relationships while learning advanced Django skills. This week on the show, previous guest Martin Breuss talks about his new four-part tutorial series, “Build a Social Network With Django.”
REAL PYTHON podcast

Solving Wordle With Python
“Wordle seems to be trending and it got me thinking of what would be the best algorithm to solve it. I decided to do a naive implementation in Deepnote with Python that only uses NLTK’s list of all english words and base letter frequencies in english texts. This way, I was able to solve the January 18 challenge, but I used up all available attempts.”
SIMON SOTAK

Scrape Your Web Data From Any Target
With Oxylabs Scraper APIs, extract public data from the most complex targets. Our Scraper APIs handle JavaScript-heavy websites and support large data requests using over 102 million global proxy infrastructure. Receive data in JSON or CSV format and pay per successful request only. Start free trial →
OXYLABSsponsor

Starting With Python IDLE
In this course, you’ll learn how to use the development environment included with your Python installation. Python IDLE is a small program that packs a big punch! You’ll learn how to use Python IDLE to interact with Python directly, work with Python files, and improve your development workflow.
REAL PYTHON course

Modulo String Formatting in Python
You can use the % modulo operator for string formatting in Python. It’s a commonly used technique in older Python versions, especially in Python 2. Therefore, you might see it when digging into existing code bases, and it can be helpful to understand how it works.
REAL PYTHON

Understand Django: Go Fast With Django
How do you make your Django app fast? You measure what is slow, scale your system when necessary, and use a combination of fast database queries and strategic caching. This artcile explores those topics and more to help you get a performant Django app.
MATT LAYMAN • Shared by Matt Layman

Static Typing for Python Decorators
Accurately static typing decorators in Python is tricky. The wrapper function obfuscates type information required to statically determine the types of the wrapped function parameters. Here’s how you can circumnavigate that.
REDOWAN DELOWAR • Shared by Redowan Delowar

Python Type Hints: How to Type a Descriptor
“The descriptor protocol allow us to completely customize attribute access. Python’s documentation describes the protocol with types involved described with words. Let’s look at how we can write those as type hints.”
ADAM JOHNSON

The Power of Python Descriptors
An introduction to the Python descriptor protocol, with some example use cases. The descriptor protocol allows you to implement custom logic when a variable is accessed, or assigned a new value.
PICCOLO-ORM.COM

The Developer / Product Team Notification Template Problem
Notifications are hard. They require infrastructure that is reliable, scalable and observable as well as an end user experience that is helpful and respectful. That’s why we built Courier.
COURIERsponsor

Dealing With YAML With Arbitrary Tags in Python
Using the PyYAML library to safely read and write YAML with any tags, in a way that’s as straightforward as interacting with built-in types.
ANDGRAVITY.COM

An Introduction to Mypy’s @overload
“Sometimes the type of the returned value in a function depend on the type of the arguments in ways that can’t be captured with a Union.”
PATRICK NSUKAMI • Shared by Patrick Nsukami

How Vectorization Speeds Up Your Python Code
Vectorization allows you to speed up processing of homogeneous data in Python. Learn what it means, when it applies, and how to do it.
ITAMAR TURNER-TRAURING

A Trick to Have Arbitrary Infix Operators In Python
Discussing an interesting trick which adds support for infix operators in Python, e.g. 5 |add| 6
TOMER FILIBA

DIY Self Driving: A Holiday Side Project With Python
TRISTAN RICE


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 →

pyccolo: Declarative Instrumentation for Python
GITHUB.COM/SMACKE

Qtile: Hackable Tiling Window Manager Written in Python
QTILE.ORG

sonora: A gRPC-Web Implementation for Python
GITHUB.COM/PUBLIC

EasyRPC: Sharing Python Functions Between Processes and Applications
GITHUB.COM/CODEMATION • Shared by Joshua Jamison

📆🐍 Upcoming Python Events


⋅ Weekly Real Python Office Hours Q&A (Virtual) January 25, 2022

⋅ PyCamp Leipzig 2022 January 29 to January 31, 2022

⋅ PyDelhi User Group Meetup January 29, 2022

⋅ PythOnRio Meetup January 29, 2022

⋅ Introduction to the Python Programming Language (In Persian) February 1, 2022

⋅ PyCon Iran Conference (Virtual) February 1 to February 2, 2022

⋅ DjangoCon Europe 2022 September 21 to 25, 2022 in Porto, Portugal
Happy Pythoning!
Copyright © 2022 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

Object Subscriptions Deep-Dive, Django Survey Results, Pip Caching, and More

Tuesday, January 18, 2022

Unravelling "`[]`" Subscriptions in Python #508 – JANUARY 18, 2022 VIEW IN BROWSER The PyCoder's Weekly Logo Unravelling “ [] ” Subscriptions in Python “It's quite possible you're

Django Front Ends, Language of the Year, PSF News, and More

Tuesday, January 11, 2022

Build a Django Front End With Bulma – Part 2 #507 – JANUARY 11, 2022 VIEW IN BROWSER The PyCoder's Weekly Logo Hey there, Quick announcement: I'm looking to hire a talented PyCoder's Weekly

Build a Social Network With Django, Make Your Own Linter, Log Injections Attacks, and More

Tuesday, January 4, 2022

Gem: Exploding String Alternatives #506 – JANUARY 4, 2022 VIEW IN BROWSER The PyCoder's Weekly Logo Gem: Exploding String Alternatives Here's a Python gem: a small bit of Python that uses the

The "zipimport" Module, Fast Async HTTP Requests, Versioning, PEP 669, and More

Tuesday, December 28, 2021

Python Zip Imports: Distribute Modules and Packages Quickly #505 – DECEMBER 28, 2021 VIEW IN BROWSER The PyCoder's Weekly Logo Python Zip Imports: Distribute Modules and Packages Quickly In this

Python Exceptions, Poetry, Steering Council Elections, and More

Tuesday, December 21, 2021

Raising and Handling Python Exceptions #504 – DECEMBER 21, 2021 VIEW IN BROWSER The PyCoder's Weekly Logo Raising and Handling Python Exceptions In this course, you'll learn what an exception

You Might Also Like

Stripe changes its … stripes

Wednesday, April 24, 2024

TikTok on the president's docket and Nvidia acquires Run:ai View this email online in your browser By Christine Hall Wednesday, April 24, 2024 Good afternoon, and welcome to TechCrunch PM! Today

💪 You Can Use Copilot AI as a Personal Trainer — Why Your Laptop Needs a Docking Station

Wednesday, April 24, 2024

Also: Here's How to Make Your Apple ID Recoverable, and More! How-To Geek Logo April 24, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to

JSK Daily for Apr 24, 2024

Wednesday, April 24, 2024

JSK Daily for Apr 24, 2024 View this email in your browser A community curated daily e-mail of JavaScript news JSK Weekly - 24th April, 2024 React 19 has introduced many great functionalities and

Daily Coding Problem: Problem #1422 [Hard]

Wednesday, April 24, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Airbnb. Given a list of integers, write a function that returns the largest sum of non-

Charted | Artificial Intelligence Patents, by Country 🤖

Wednesday, April 24, 2024

This visualization shows which countries have been granted the most AI patents each year, from 2012 to 2022. View Online | Subscribe Presented by: New on VC+: Our Visual Briefing on the IMF's World

Save your seat: 1Password’s 2024 Security report insights webinar

Wednesday, April 24, 2024

Join us April 25th. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Top Tech Deals 📱 LG Flex TV, Google Pixel 7, DJI Mini 3, and More

Wednesday, April 24, 2024

Get yourself a discounted DJI drone, save on the Pixel 7, or score some PC and phone accessories. How-To Geek Logo April 24, 2024 Top Tech Deals: LG Flex TV, Google Pixel 7, DJI Mini 3, and More Find

The Protest Song Wakes Up 🎙️

Wednesday, April 24, 2024

Is this song the future of musical protest? Here's a version for your browser. Hunting for the end of the long tail • April 24, 2024 The Protest Song Wakes Up A buzzy protest song about the

JSK Weekly - 24th April, 2024

Wednesday, April 24, 2024

React 19 has introduced many great functionalities and features, among which the useOptimistic hook stands out. The useOptimistic hook offers a seamless way to manage UI states during asynchronous

The clock’s ticking for TikTok

Wednesday, April 24, 2024

The US Senate has passed a bill that would ban TikTok if its US business is not divested by Bytedance View this email online in your browser By Alex Wilhelm Wednesday, April 24, 2024 Good morning, and