#506 – JANUARY 4, 2022
View in Browser »
Gem: Exploding String Alternatives
Here’s a Python gem: a small bit of Python that uses the power of the language and standard library well. It’s a function to list strings generated by a pattern with embedded alternatives. It takes an input string with brace-wrapped possibilities, and generates all the strings made from making choices among them: explode("{Alice,Bob} ate a {banana,donut}.")
NED BATCHELDER
Build a Social Network With Django – Part 1
In this four-part tutorial series, you’ll build a social network with Django to showcase in your portfolio. You’ll learn about relationships between Django models and how to use forms so that users can interact with your app. You’ll also make your site look good by using the Bulma CSS framework.
REAL PYTHON
Provision Your Cloud Infrastructure Using Python and Pulumi
What if you could use your existing programming knowledge to build, deploy, and manage cloud infrastructure using your favorite languages and tools? Pulumi is a cloud engineering platform that lets you write infrastructure as code in any programming language, on any cloud platform. Get started today →
PULUMI sponsor
Learn Python ASTs, by Building Your Own Linter
A guide to Abstract Syntax Trees in Python. They form the basis of a lot of tools we take for granted, like linters, code formatters and syntax highlighting. With this article you’ll get to learn about ASTs by building your own linter from scratch.
TUSHAR SADHWANI • Shared by Tushar Sadhwani
Discussions
Python vs C %
(Modulo/Remainder) Operator Behavior
In Python the %
operator returns a number with the same sign as the second argument. C doesn’t actually have a “modulo” operator but a “remainder” operator, according to the C spec. Read the Hacker News discussion after the tweet for a full explanation.
TWITTER.COM/ID_AA_CARMACK
Python Threads Scheduling Differences Between 3.10 and 3.9
“Unintended consequence of Mark Shannon’s change that refactors fast opcode dispatching […]”
STACK OVERFLOW
Python Jobs
Senior Software Engineer (Anywhere)
Senior DevOps Engineer (San Jose, CA, USA)
Senior Python Developer (100% Remote) (Anywhere)
Senior Software Engineer (Anywhere)
Articles & Tutorials
Is Your Python Code Vulnerable to Log Injection?
Following the news on log4j lately, you may wonder if Python’s logging library is safe. After all, there is a potential for injection attacks where string formatting meets user input. Thankfully, Python’s logging isn’t vulnerable to remote code execution. Nonetheless it is still important to be careful with untrusted data. This article describes some common pitfalls, and how logging f-strings could—in certain situations—leave you vulnerable to other types of attacks.
ARIE BOVENBERG • Shared by Arie Bovenberg
2021 Real Python Articles Wrap Up
It’s been a year of change at Real Python! The Real Python team has written, edited, curated, illustrated, and produced a mountain of Python articles this year. We also added many new members to the team, updated the site’s features, and created new styles of tutorials and projects.
REAL PYTHON podcast
Application Performance Monitoring, Built for Developers by Developers
Scout is an application performance monitoring tool designed to help Python developers find and fix performance issues quickly. With unlimited seats and applications, users of Scout’s APM tool find that anyone can be a performance expert. Click to sign up for your free 14-day trial today →
SCOUT APM sponsor
Python Type Hints: How to Handle Optional Imports
This post is not about importing typing.Optional
, but instead imports that are themselves optional. Libraries often have optional dependencies, and the code should work whether or not the import is there.
ADAM JOHNSON
Reading Tracebacks in Python
When exceptions go unhandled, Python prints a traceback. Tracebacks are read from the bottom upward. The last line describes what happened and lines above describe where it happened.
TREY HUNNER
Three Problems With a Tool
A discussion of three problems with Python: “packaging, fractured tooling, crufty standard library”
MOSHE ZADKA
What’s Your Favorite Programming Language?
Take the Developer Nation survey, share your views and make an impact on the developer ecosystem. Plus, you get a chance to win cool prizes, licenses, gaming accessories, vouchers and many more.
SLASHDATA LTD sponsor
Projects & Code
python-minifier: Transform Python Source Code Into It’s Most Compact Representation
GITHUB.COM/DFLOOK • Shared by Python Bytes FM
Events
Weekly Real Python Office Hours Q&A (Virtual)
January 5, 2021
REALPYTHON.COM
Canberra Python Meetup
January 6, 2022
MEETUP.COM
Sydney Python User Group (SyPy)
January 6, 2022
SYPY.ORG
Reunión Python Valencia
January 6, 2022
GOOGLE.COM
Python Miami
January 8 to January 9, 2022
PYTHONDEVELOPERSMIAMI.COM
DFW Pythoneers 2nd Saturday Teaching Meeting
January 8, 2022
MEETUP.COM
Edmonton Python User Group
January 10, 2022
EDMONTONPY.COM
Happy Pythoning!
This was PyCoder’s Weekly Issue #506.
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