About:

Stephen Gruppetta is the author of The Python Coding Stack, a Substack publication. He writes articles that he wishes he had when learning Python programming. His approach to learning and teaching is through narratives and stories, communicated in a friendly and relaxed tone, making the content clear and accessible. The publication has thousands of subscribers.

Website:

Incoming Links:

Subscribe to RSS:
Descriptors in Python provide a powerful way to manage attribute access and validation, as demonstrated through a Product class managing cost and selling prices.
The article explores the inner workings of Python programs by disassembling code using the `dis` module. It explains how Python converts code into bytecode and provides insights into the execution process, including the use of spe...
The post presents a narrative from the perspective of a Python object, detailing its creation, identity, and interactions within a Python program. It describes the object's journey from instantiation to its eventual deletion, emph...
The author expresses a dislike for the 'magic' behind programming languages like Python, particularly when it comes to understanding named tuples and data classes. They explain the syntax differences between standard classes, data...
The article explains the singleton design pattern in Python, illustrating its implementation through a leaderboard example in a game context. It discusses the concept of a singleton, where a class can only produce one instance, an...
The article discusses how Python manages memory and garbage collection, particularly focusing on the deletion of objects. It explains the concept of reference counting, how objects are removed from memory when their reference coun...
Exploring the Parkrun tradition, the post illustrates how Python's looping mechanisms differ from other languages, highlighting the benefits of using the for loop and the enumerate() function.
Yteria, a member of a local Python group, is tasked with organizing one-to-one networking meetings. She faces a unique challenge as she has lost the word 'for', which complicates her coding. The article explores various coding sol...
The post contrasts the LBYL and EAFP programming philosophies in Python, highlighting their implications and the author's shift in teaching style over the years.
This post illustrates the OOP mindset in Python through a practical example, emphasizing the importance of structuring data and functionality into objects.
Python doesn't have constants, but Enums can be used to create immutable identifiers that enhance code safety and readability.
Implementing a priority queue in Python using the heapq module allows for efficient management of customer service tiers based on priority levels.
The blog post discusses the author's journey in rekindling a passion for track and field athletics and the development of a software class to manage event results. It outlines the creation of classes for athletes and events, detai...
The post discusses common misconceptions in Python documentation regarding the use of loops, specifically focusing on the functions zip(), enumerate(), and range(). It highlights the confusion surrounding the number of errors in a...
Special methods in Python, often called dunder methods, are crucial for object operations, and the author humorously suggests renaming them 'plumbing methods' to reflect their hidden yet vital role.
The post discusses the use of the 'or' keyword in Python to address the mutable default value problem in functions. It explains how using 'None' as a default value allows the 'or' expression to create a new list if no argument is ...
The post discusses the philosophy of Python data types, particularly focusing on tuples and their comparison to lists and strings. It emphasizes that while tuples are often introduced as similar to lists, the real questions about ...
The article explains the behavior of the `or` and `and` keywords in Python, focusing on their truthiness evaluation and short-circuiting behavior. It illustrates how `or` returns the first truthy operand and how `and` requires bot...
A series of interactive Python workshops is being offered to help coders deepen their understanding of key programming concepts and improve their coding skills.
The author shares a year-end reflection on Python programming topics, personal experiences, and encourages community engagement through premium content.
The post discusses the concept of zymology and uses the metaphor of finding a word in a dictionary to explain the purpose of hash values for hashable objects. It emphasizes the challenges of locating words without knowledge of the...
This post highlights the num2words Python package for converting numbers to words, showcasing its simplicity and multilingual capabilities.
A Python program for meal planning and shopping list generation is explored, emphasizing the use of alternative constructors with class methods.
The article discusses various methods to remove duplicate values from a Python list. It explores manual algorithms, the use of sets and dictionaries, and the limitations of each method. The author also emphasizes the importance of...