Issue #483

Python Collections, SciPy's New Build System, What To Know About the "operator" Module, and More

July 27, 2021

Python Collections, SciPy's New Build System, What To Know About the "operator" Module, and More
#483 – JULY 27, 2021 VIEW IN BROWSER
The PyCoder’s Weekly Logo
Python’s collections: A Buffet of Specialized Data Types
Python has a number of useful data types beyond the built-in lists, tuples, dicts, and sets. In this tutorial, you’ll learn all about the series of specialized container data types in the collections module from the Python standard library. Learning the collections module is a great way to level up your Python programming knowledge!
REAL PYTHON

Moving SciPy to the Meson Build System
In accordance with PEP 632, distutils will be deprecated in Python 3.10 and in Python 3.12 it will be removed. This posed a big problem for SciPy, since it’s build system depends on NumPy’s distutils module — an extension of Python’s built-in distutils. The SciPy maintainers set out to find a new build system and settled on Meson, which solves a number of build issues and even scores a 4x speed-up on build times!
RALF GOMMERS

An Immersive Virtual Office For Your Team
What if you could run into people at the office…while you work remotely? Gather makes it possible. Claim a desk, chat by the water cooler, and hold important meetings in an interactive space. Free up to 25 users →
GATHERsponsor

The Unknown Features of Python’s Operator Module
Have you heard of Python’s operator module? It includes functions for common operators, including mathematical operators like +, -, *, and /, and well as operators for getting items from dictionaries and accessing object attributes. The operator module might seem confusing at first glance. This article explores why it exists, what benefits you get from it, and when it makes sense to use it in your code.
MARTIN HEINZ • Shared by Martin Heinz

Python Software Foundation Fellow Members for Q2 2021
PYTHON SOFTWARE FOUNDATION


Discussions


Do Not Use Mutable Objects as Default Arguments in Python
Ah, mutable default arguments. If you haven’t come across them in your Python journey yet, this Reddit thread is full of examples of Python developers that lost time debugging functions with a mutable default argument. Avoiding mutable defaults is good advice in general, but blanket absolute statements are dangerous. To counter this discussion, here’s a Twitter thread exploring some genuine use cases.
REDDIT


Python Jobs


Backend Software Engineer
CATALPA INTERNATIONAL 📍 REMOTE

Python Developer
TESSIAN 📍 REMOTE

Software Developer
UNIVENTION GMBH 📍 REMOTE

Backend Software Engineer
QUORUM 📍 WASHINGTON, D.C., USA

Senior Cloud Platform Engineer
APHERIS 📍 BERLIN, GERMANY

Software Engineer
CLOSE 📍 REMOTE

Backend Software Engineer
TESSIAN 📍 REMOTE

Python Web Developer
PREMIERE DIGITAL SERVICES 📍 REMOTE

More Python Jobs >>>


Articles & Tutorials


The Pandas DataFrame: Working With Data Efficiently
In this tutorial, you’ll get started with Pandas DataFrames, which are powerful and widely used two-dimensional data structures. You’ll learn how to perform basic operations with data, handle missing values, work with time-series data, and visualize data from a Pandas DataFrame.
REAL PYTHON course

Testing the Diff
How do you write good tests? It’s a challenging problem because there are a number of layers involved. You need to write good test code that follows best practices. But you also need to write tests that aren’t fragile and make sure tests really test what you expect them to. This article gives an example of a seemingly harmless test that turns out to be pretty fragile. You’ll learn one technique for making a test more robust called “testing the diff.”
FILIPE XIMENES • Shared by Filipe Ximenes

Try Scout Free for 14-days, no CC Needed, and see why Developers Call Scout their Best Friend
Scout uses tracing logic to tie bottlenecks to source code so devs can get back to building great products instead of wasting time fixing performance issues. Our real-time alerting and streamlined dashboards provide the data insights necessary for any developer to become a performance pro →
SCOUT APMsponsor

Beautiful Ideas in Programming: Generators and Continuations
This article explores how generators, which you can create in Python using the yield keyword in a function, are special cases of a more powerful construct called “continuations.” The author compares Python’s generator syntax to creating continuations in Scheme, a modern LISP dialect. The idea isn’t so much to learn how to write generators and continuations, but rather to explore how the ideas are related and to appreciate the elegance and beauty of both concepts.
HSIN-HAO YU

What Can You Do With Python and Counting Objects Using Counter
How is Python being used today, and what can you do with the language? Do you want to develop software, dive into data science and math, automate parts of your job and digital life, or work with electronics? This week on the Real Python Podcast, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects.
REAL PYTHON podcast

Why Tracing Might Replace (Almost) All Logging
Lightstep CEO and Co-founder Ben Sigelman shares his vision for the future of distributed tracing.
LIGHTSTEPsponsor

Efficient Pagination in Django and Postgres
Pagination breaks up results from a query into chunks called “pages” so that only a few results are returned to the user at a time. In many cases, using native SQL tools like LIMIT and OFFSET can get you up and running with pagination quickly and work fairly well. But on datasets with millions of rows, this method breaks down. This helpful article shows you three methods for efficiently handling pagination using Django and Postgres.
RYAN WESTERBERG • Shared by Manuel Weiss

Your First Steps With Django: Set Up a Django Project
This tutorial provides a walkthrough and a reference for starting a Django project and app. You can use it as a quick setup guide for any future Django project and tutorial you’ll work on.
REAL PYTHON


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 →

qmsolve: A Module for Solving and Visualizing the Schrödinger Equation
GITHUB.COM/QUANTUM-VISUALIZATIONS

jupyter-text2code: A Proof-of-Concept Jupyter Extension Which Converts English Queries Into Python Code
GITHUB.COM/DEEPKLARITY

dlib: A C++/Python Toolkit for Making Real World Machine Learning and Data Analysis Applications
GITHUB.COM/DAVISKING

aptus: Mandelbrot Set Explorer and Renderer
GITHUB.COM/NEDBAT

hook-slinger: A Generic Service to Send, Retry, and Manage Webhooks
GITHUB.COM/REDNAFI • Shared by Redowan Delowar

📆🐍 Upcoming Python Events


Real Python Office Hours (Virtual)
July 28, 2021

EuroPython 2021 (Virtual)
July 26 – August 1, 2021

PyOhio 2021 (Virtual)
July 31 — August 1, 2021

PyCon India 2021 (Virtual)
September 17 – 20, 2021
Happy Pythoning!
Copyright © 2021 PyCoder’s Weekly, All rights reserved.