Issue #527

Not Functions, But Classes; Exploring Scope; All About Asterisks; and More

May 31, 2022

Not Functions, But Classes; Exploring Scope; All About Asterisks; and More
#527 – MAY 31, 2022 VIEW IN BROWSER
The PyCoder’s Weekly Logo
Python’s “Functions” Are Sometimes Classes
Ever use list() or enumerate()? Think of them as functions? They’re not, they’re classes. Sometimes we call classes functions in Python. Why? And what’s a “callable”?
TREY HUNNER

Exploring Scopes and Closures in Python
In this Code Conversation video course, you’ll take a deep dive into how scopes and closures work in Python. To do this, you’ll use a debugger to walk through some sample code, and then you’ll take a peek under the hood to see how Python holds variables internally.
REAL PYTHON course

Ultimate Guide to Python Pickle: How To’s, Exploits & Safety
Python’s pickle library is useful in maintaining persistence within complex data structures and objects. Learn how to safely use a pickle in application development using this comprehensive guide →
SNYK.IOsponsor

All You Need to Know About Asterisks in Python
The * is for more than multiplication, it is also the basis for the two deconstruction operators: * and **. Learn the ins-and-outs of using *args, **kwargs, deconstruction, and forcing keyword-arguments-only in functions.
BAS STEINS

ctx Library Hijacked to Steal AWS Keys
AX SHARMA


Discussions


Useful Python Decorators for Data Scientists
Marton Trencseni posted Useful Python decorators for Data Scientists, a follow-up to the article included in Issue #525. It got posted on Hacker News and strong opinions ensued. Read the article, then weigh in.
HACKER NEWS

Python Standard Library Changes in Recent Years
Discussion based on the previously linked article Python Standard Library Changes in Recent Years.
HACKER NEWS


Python Jobs


Gameful Learning Developer
UNIVERSITY OF MICHIGAN 📍 ANN ARBOR, MI, USA

Python Technical Architect
BLENDERBOX 📍 USA

Software Engineer, Los Angeles or Dallas
CAUSEWAY CAPITAL MANAGEMENT LLC 📍 LOS ANGELES, CA, USA

DevOps Engineer
UNIVERSITY OF MICHIGAN 📍 ANN ARBOR, MI, USA

Academic Innovation Developer
UNIVERSITY OF MICHIGAN 📍 ANN ARBOR, MI, USA

Software Development Lead
UNIVERSITY OF MICHIGAN 📍 ANN ARBOR, MI, USA

Senior Backend Engineer
DOIST 📍 ANYWHERE

Senior Storytelling Framework Engineer - Python
GOPRO 📍 FRANCE

Senior Software Engineer - Python Full Stack
BLENDERBOX 📍 USA

More Python Jobs >>>


Articles & Tutorials


How to Create a Command-Line Application With argparse
Scripts often need either configuration or data to proceed and for many situations this can be passed in on the command line. The standard library argparse helps you parse arguments, add help info, and even alias your commands.
MIKE DRISCOLL

A Quick Way to Animate Your Python Plots
There are lots of choices when developing animated plots, many of which have a steep learning curve. Learn how to create animated GIFs through matplotlib and ImageIO to bash something out quickly.
CHRISTOPHER TAO

Build Web Apps Entirely in Python
With Anvil, you can build seriously powerful web apps with Python - no web dev experience needed! Design your UI with drag-and-drop components. Build your application with Python (not JS or HTML). Deploy in the cloud with one click, or on site with a pip-install. Check it out →
ANVILsponsor

Lesser Known Django Management Commands
You probably know about runserver, migrate and shell, but there are lots more Django management commands. Learn about diffsettings, sendtestemail, inspectdb, and showmigrations.
GONÇALO VALÉRIO

Animating Regular Expressions With Python and Graphviz
Visualizing regular expressions can help you understand how they work and what a particular expression accomplishes. Read on to learn how to use Graphviz to better understand your regex.
AYDIN SCHWARTZ

Build a CRUD Application Using Django, React & Docker
Step-by-step instructions on creating a web application with a React front-end and the Django Rest Framework as a back-end and all tied together with Docker for distribution.
MANGABO KOLAWOLE

What’s in Which Python
A quick listing of what features were added in which version of Python, going back to Python 2.1 and including links to corresponding PEPs.
NED BATCHELDER

Unlock Secret Knowledge From Python Experts for Just $10
Packt’s Spring Sale is on and for a limited period, all eBooks and Videos are only $10. Our Products are available as PDF, ePub, and MP4 files for you to download and keep forever. All the practical content you need - by developers for developers.
PACKT PUBLISHINGsponsor

Native Type/Dunder-Methods in Python
Learn how to make your classes act like native data types through the implementation of double-underscore magic methods.
THEODOROS KARASAVVAS

The Unreasonable Effectiveness of f-strings and re.VERBOSE
A look at one or two ways to make life easier when working with Python regular expressions.
ANDGRAVITY.COM


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 →

import-tracker: Track 3rd Party Dependencies Within a Library
GITHUB.COM/IBM

dowsing: Metadata Extraction Without Execution
GITHUB.COM/PYTHON-PACKAGING

lineapy: Capture, Analyze, & Automate Data Science Workflows
GITHUB.COM/LINEALABS

Mindfulness-at-the-Computer the App
GITLAB.COM/MINDFULNESS-AT-THE-COMPUTER

PyDaddy: Discover SDE Equations From Time-Series Data
GITHUB.COM/TEE-LAB • Shared by Ashwin Karichannavar

📆🐍 Upcoming Python Events


STL Python
June 1, 2022

Weekly Real Python Office Hours Q&A (Virtual)
June 1, 2022

PyCon Italy 22
June 2 to June 6, 2022

Sydney Python User Group (SyPy)
June 2, 2022

Reunión Python Valencia
June 2, 2022

Virtual PythonCamp Cologne 2022
June 4 to June 6, 2022
Happy Pythoning!
Copyright © 2022 PyCoder’s Weekly, All rights reserved.