#509 – JANUARY 25, 2022
View in Browser »
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 AI sponsor
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)
Python Engineer (Web Scraping) (Asia, TX, America)
PyCoder's Weekly Curator and Podcast Co-Host (Anywhere)
Senior Software Engineer (Anywhere)
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 →
OXYLABS sponsor
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.
COURIER sponsor
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
Projects & Code
EasyRPC: Sharing Python Functions Between Processes and Applications
GITHUB.COM/CODEMATION • Shared by Joshua Jamison
Events
Weekly Real Python Office Hours Q&A (Virtual)
January 25, 2022
REALPYTHON.COM
PyCamp Leipzig 2022
January 29 to January 31, 2022
BARCAMPS.EU
PyDelhi User Group Meetup
January 29, 2022
MEETUP.COM
PythOnRio Meetup
January 29, 2022
PYTHON.ORG.BR
PyCon Iran Conference (Virtual)
February 1 to February 2, 2022
PYCON.ORG • Shared by PyCon Iran Team
DjangoCon Europe 2022
September 21 to 25, 2022 in Porto, Portugal
DJANGO SOFTWARE FOUNDATION
Happy Pythoning!
This was PyCoder’s Weekly Issue #509.
View in Browser »
[ Subscribe to 🐍 PyCoder’s Weekly 💌 – Get the best Python news, articles, and tutorials delivered to your inbox once a week >> Click here to learn more ]
from Planet Python
via read more
No comments:
Post a Comment