Issue #479

Subclassing in Python, Correlation Analysis 101, Reversion Python Lists and Beyond, And More

June 29, 2021

Subclassing in Python, Correlation Analysis 101, Reversion Python Lists and Beyond, And More
#479 – JUNE 29, 2021 VIEW IN BROWSER
The PyCoder’s Weekly Logo
Subclassing in Python Redux
Have you ever heard someone say that composition is better than inheritance? It’s an age-old conflict in object-oriented programming that’s been the impetus for numerous online debates. Author Hynek Schlawack, who describes himself as “firmly in the composition-over-inheritance camp” explains in this article how “Python is designed in a way that you can’t write idiomatic code without subclassing sometimes.”
HYNEK SCHLAWACK

Correlation Analysis 101 in Python
Correlation analysis is a useful part of exploratory data analysis. It can help you identify potential relationships between various features of your data. In this helpful guide, you’ll learn how to do correlation analysis in a pandas DataFrame. You’ll see how to display a correlation matrix as a heatmap and explore some guidelines for identifying when correlation might imply causation.
OLGA BEREZOVSKY • Shared by Olga Berezovsky

Learn How to Scale Python with Dask
If you’ve taken your data skills from zero to one with PyData (e.g. Pandas, Scikit-Learn) then this two-day, interactive class will help you use larger data sets that won’t fit in memory and will help you distribute your workloads to accelerate your code with Dask. Limited seats. Register now →
COILED COMPUTING, INCsponsor

Reverse Python Lists: Beyond .reverse() and reversed()
In this step-by-step tutorial, you’ll learn about Python’s tools and techniques to work with lists in reverse order. You’ll also learn how to reverse your list by hand.
REAL PYTHON

Python 3.9.6, 3.8.11, 3.7.11, and 3.6.14 Are Now Available
CPYTHON DEV BLOG

2021 Python Web Conference Videos Released
SIXFEETUP.COM • Shared by Laura Stephens

DjangoCon US 2021 Call for Proposals Is Open
PAPERCALL.IO

CPython Internals: Paperback Now Available!
With CPython Internals: Your Guide to the Python 3 Interpreter, you’ll unlock the inner workings of the Python language, learn how to compile the Python interpreter from source code, and cover what you’ll need to know to confidently start contributing to CPython yourself.
REAL PYTHON


Discussions


Tkinter… Not Bad
Tkinter. Sometimes it seems like you either love it or hate it. While Tkinter doesn’t check all the boxes for every GUI, it definitely has its use cases. And the fact that it comes built into the Python standard library is a huge plus. This Reddit thread spreads some much-needed love for the library.
REDDIT


Python Jobs


Backend Software Engineer (Remote)
TESSIAN

Python Web Developer (Los Angeles, CA, USA)
PREMIERE DIGITAL SERVICES

Senior Software Engineer (Remote)
TRUVERIS

Senior Software Engineer (Washington D.C., DC, USA)
TRUTH INITIATIVE

More Python Jobs >>>


Articles & Tutorials


Built-in Permission Classes in Django Rest Framework
Django REST Framework (DRF) is a full-featured framework built on top of Django for creating REST APIs. This article covers built-in permissions classes in DRF that you can use to restrict permissions on an API view. You’ll learn how to use each of the seven built-in classes, as well as how to restrict permissions globally or per object.
ŠPELA GIACOMELLI • Shared by GirlLovesToCode

A From-Scratch Tour of Bitcoin in Python
This in-depth article from Tesla’s head of AI shows you how to create, digitally sign, and broadcast a Bitcoin transaction in pure Python, from scratch, and with zero dependencies. Along the way, you’ll learn quite a bit about how Bitcoin works under the hood.
ANDREJ KARPATHY

One API to Manage Transactional Messages From Your Python App: Email, SMS, Push, In-App, Slack
Trigger event-based messages from your Python app in just a few lines of code. One API with endpoints for white-label branding, sophisticated automation rules, and an in-app inbox. Product can design messages with our drag and drop editor. 10k notifications free /mo with Courier →
COURIERsponsor

Practicing Python With CSV Files and Extracting Values With filter()
Are you ready to practice your Python skills some more? There is a new set of practice problems prepared for you to tackle, and this time they’re based on working with CSV files. 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

Measuring Memory Usage in Python: It’s Tricky!
Measuring memory usage in Python is tricky. In this article, you’ll learn a simplified yet informative model for how memory works. You’ll explore two memory-resident and allocated memory and how to measure them with Python. Finally, you’ll explore the tradeoffs between the two methods for measuring memory.
ITAMAR TURNER-TRAURING

Functools: The Power of Higher-Order Functions in Python
The functools module is one of the “hidden gems” of the Python standard library. This article takes you on a tour of everything in functools. You’ll learn how to implement caching, function overloading, and a whole lot more.
MARTIN HEINZ • Shared by Martin Heinz

Python Inner Functions
In this step-by-step course, you’ll learn what inner functions are in Python, how to define them, and what their main use cases are.
REAL PYTHON course


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 →

devops-exercises: DevOps Interview Questions
GITHUB.COM/BREGMAN-ARIE

ormar: Python Async Orm With Fastapi in Mind and Pydantic Validation
GITHUB.COM/COLLEREK

mitogen: Distributed Self-Replicating Programs in Python
GITHUB.COM/MITOGEN-HQ

play-online-chess-with-real-chess-board: Use Python and OpenCV to Play Online Chess With a Real Chessboard
GITHUB.COM/KARAYAMAN

casspop/ohd: Garage Door Monitor
GITHUB.COM/CASSPOP

scanapi: Automated Integration Testing and Live Documentation for your API
GITHUB.COM/SCANAPI • Shared by Camila Maia

📆🐍 Upcoming Python Events


⋅ Real Python Office Hours (Virtual) June 30, 2021

⋅ PyHEP 2021 July 5 – 10, 2021

⋅ PyBirras 2021 (Virtual) July 8, 2021

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

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