Issue #523

Dunder Methods, Closing Files, The GIL, and More

May 3, 2022

Dunder Methods, Closing Files, The GIL, and More
#523 – MAY 3, 2022 VIEW IN BROWSER
The PyCoder’s Weekly Logo
Dunder Methods in Python: The Ugliest Awesome Sauce
Double-underscore methods, also known as “dunder methods” or “magic methods” are an ugly way of bringing beauty to your code. Learn about constructors, __repr__, __str__, operator overloading, and getting your classes working with Python functions like len().
JOHN LOCKWOOD

Why Is It Important to Close Files in Python?
Model citizens use context managers to open and close file resources in Python, but have you ever wondered why it’s important to close files? In this tutorial, you’ll take a deep dive into the reasons why it’s important to close files and what can happen if you dont.
REAL PYTHON

Try atoti, A Free Collaborative Python BI Analytics Platform
atoti is a BI analytics platform combining a python library and a web application helping Quants, Data Analyst, Data Scientist and Business Users to collaborate, analyze and translate their data into business KPIs →
ACTIVEVIAMsponsor

When Python Can’t Thread: A Deep-Dive Into the GIL’s Impact
Python’s Global Interpreter Lock (GIL) stops threads from running in parallel or concurrently. Learn how to determine the impact of the GIL on your code.
ITAMAR TURNER-TRAURING

micro:bit Python Editor Beta 3 Released
MICROBIT.ORG

2022 “Call for Code” Global Challenge Accepting Entries
CALLFORCODE.ORG

Jupyter Community Workshops: Call for Proposals
JUPYTER.ORG


Discussions


Python Shouldn’t Be the Top Programming Language
Discussion of the controversial article Python Is Now Top Programming Language — But Shouldn’t Be
HACKER NEWS

When Would You Use the Lambda Function?
REDDIT


Python Jobs


Senior Software Engineer - Python Full Stack
BLENDERBOX 📍 USA

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

Data & Operations Engineer
UNIVERSITY OF MICHIGAN 📍 ANN ARBOR, MI, USA

Python Technical Architect
BLENDERBOX 📍 USA

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

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

Lead Software Engineer
RIGHT SIDE UP 📍 ANYWHERE

Data Engineer
AQUATIC CAPITAL MANAGMENT 📍 CHICAGO, IL, USA

More Python Jobs >>>


Articles & Tutorials


Python Testing With doctest
Python’s doctest module allows you to write unit tests through REPL-like sessions in your doc-strings. Learn how to write and execute doctest code. Also available in video.
MIKE DRISCOLL

Handling Retries in Python Requests
When coding with requests and urllib3 you can automatically retry failed connections through the use of requests.adapters.HTTPAdapter and urllib3.Retry. Don’t code retry loops manually, learn how to take advantage of the features of the libraries.
MARKKU LEINIÖ • Shared by Markku Leiniö

Merge Faster with WorkerB for PRs Chrome Extension
The average pull request sits idle for two days! Add context to your PR & merge faster with WorkerB magic links. Get estimated review time, number of changes, & related issues in one click! Install it today →
LINEARBsponsor

Understanding Train Test Split
The Train-Test-Split methodology is useful for supervised machine learning with a given data set. It helps ensure that new data is more likely to be categorized correctly. Learn how to use it with Python and scikit-learn.
MICHAEL GALARNY • Shared by Michael Galarnyk

Pagination for a User-Friendly Django App
In this tutorial, you’ll learn how to serve paginated content in your Django apps. Using Django pagination can significantly improve your website’s performance and give your visitors a better user experience.
REAL PYTHON

Code Quality Tools in Python
The article describes what code quality means and introduces some cool tools to improve your Python, including a variety of linters, formatters, and IDE tools.
DOLLAR DHINGRA • Shared by Dollar Dhingra

Notes on Debugging
All programmers have to learn how to do it, and like all skills it takes practice. Learn some hints and approaches to the bane of us all: debugging.
IONEL CRISTIAN MĂRIEȘ

CData Software — The Easiest Way to Connect Python With Data
Connect, Integrate, & Automate your data from any other application or tool in real-time, on-premise or cloud, with simple data access to more than 250 cloud applications and data sources. Learn more at cdata.com
CDATA SOFTWAREsponsor

MicroPython in Docker Containers
Want to play with MicroPython without a board? Learn how to use the Unix port of MicroPython in a Docker container to test out your code.
BHAVESH KAKWANI

Incorporating Julia Into Python Programs
Learn what you need to get Julia running inside your Python programs, using PyJulia, PyCall, and how to set up your environments.
PETER BAUMGARTNER


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 →

pet-python-startrek: 1977 Commodore PET Star Trek Remake
GITHUB.COM/BLOGMYWIKI

MNE: Explore and Visualize Neurophysiological Data
MNE.TOOLS

slipcover: Near Zero-Overhead Python Code Coverage Tracking
GITHUB.COM/PLASMA-UMASS

exceptionite: Make Prettier Exceptions a Cinch
GITHUB.COM/MASONITEFRAMEWORK

Real Time Multiplayer Bingo Game Using Django Channels
GITHUB.COM/LEARNINGNOOBI

📆🐍 Upcoming Python Events


PyCon US 2022
April 27 to May 6, 2022

STL Python
May 4, 2022

Weekly Real Python Office Hours Q&A (Virtual)
May 4, 2022

Heidelberg Python Meetup
May 4, 2022

Canberra Python Meetup
May 5, 2022

PyCon Kenya Conference 2022
May 6 to May 8, 2022
Happy Pythoning!
Copyright © 2022 PyCoder’s Weekly, All rights reserved.