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

Distributed Locking: A Practical Guide

Monday, December 23, 2024

If you're wondering how and when distributed locking can be useful, here's the practical guide. I explained why distributed locking is needed in real-world scenarios. Explored how popular tools

⚡ THN Weekly Recap: Top Cybersecurity Threats, Tools and Tips

Monday, December 23, 2024

Your one-stop-source for last week's top cybersecurity headlines. The Hacker News THN Weekly Recap The online world never takes a break, and this week shows why. From ransomware creators being

⚙️ OpenA(G)I?

Monday, December 23, 2024

Plus: The Genesis Project ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Post from Syncfusion Blogs on 12/23/2024

Monday, December 23, 2024

New blogs from Syncfusion Introducing the New WinUI Kanban Board By Karthick Mani This blog explains the features of the new Syncfusion WinUI Kanban Board control introduced in the 2024 Volume 4

Import AI 395: AI and energy demand; distributed training via DeMo; and Phi-4

Monday, December 23, 2024

What might fighting for freedom in an AI age look like? ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

LockBit Ransomware Developer Charged for Billions in Global Damages

Monday, December 23, 2024

THN Daily Updates Newsletter cover The Data Science Handbook, 2nd Edition ($60.00 Value) FREE for a Limited Time Practical, accessible guide to becoming a data scientist, updated to include the latest

Re: How to know if your data has been exposed

Monday, December 23, 2024

Imagine getting an instant notification if your SSN, credit card, or password has been exposed on the dark web — so you can take action immediately. Surfshark Alert does just that. It helps you stay

Christmas On Repeat 🎅

Monday, December 23, 2024

Christmas nostalgia is a hell of a drug. Here's a version for your browser. Hunting for the end of the long tail • December 22, 2024 Hey all, Ernie here with a refresh of a piece from our very

SRE Weekly Issue #456

Monday, December 23, 2024

View on sreweekly.com A message from our sponsor, FireHydrant: On-call during the holidays? Spend more time taking in some R&R and less getting paged. Let alerts make their rounds fairly with our

The Power of an Annual Review & Grammarly acquires Coda

Sunday, December 22, 2024

I am looking for my next role, Zen Browser got a fresh new look, Flipboard introduces Surf, Campsite shuts down, and a lot more in this week's issue of Creativerly. Creativerly The Power of an