Tag

mutable-objects

0 views collected around this technical thread.

Test Development Learning Exchange
Test Development Learning Exchange
Feb 11, 2025 · Fundamentals

Understanding Python Parameter Passing Mechanisms and Argument Types

Python uses a pass‑by‑object‑reference model, meaning functions receive references to objects; this article explains how mutable and immutable objects behave under this model, describes positional, keyword, default, *args and **kwargs argument types, and provides code examples illustrating each case.

**kwargs*argsImmutable Objects
0 likes · 4 min read
Understanding Python Parameter Passing Mechanisms and Argument Types
Byte Quality Assurance Team
Byte Quality Assurance Team
Oct 13, 2021 · Fundamentals

Understanding Python Object Assignment, Mutable vs. Immutable Types, and Shallow vs. Deep Copying

This article provides a comprehensive guide to Python's memory management and object assignment mechanisms, clearly explaining the differences between mutable and immutable objects, direct assignment, shallow copying, and deep copying through practical code examples and visual diagrams.

Immutable ObjectsMemory ManagementObject Assignment
0 likes · 7 min read
Understanding Python Object Assignment, Mutable vs. Immutable Types, and Shallow vs. Deep Copying
Python Programming Learning Circle
Python Programming Learning Circle
Apr 20, 2021 · Fundamentals

Understanding Python Function Parameter Passing: Value vs. Reference

This article explains how Python implements function argument passing, distinguishing value passing—where a copy of the argument is used—from reference passing for mutable objects, illustrating both mechanisms with swap examples, memory diagrams, and concluding with best practices for modifying data inside functions.

function parametersmutable-objectsreference passing
0 likes · 10 min read
Understanding Python Function Parameter Passing: Value vs. Reference
Python Programming Learning Circle
Python Programming Learning Circle
Mar 3, 2020 · Fundamentals

Common Python Mistakes: Mutable Default Arguments, Class Variables, and Exception Syntax

This article explains three frequent Python pitfalls—using mutable objects as default arguments, unintentionally sharing class variables, and writing incorrect exception clauses—illustrates the problematic behavior with code examples, and provides the proper patterns to avoid each issue.

Exception Handlingclass-variablesdefault arguments
0 likes · 5 min read
Common Python Mistakes: Mutable Default Arguments, Class Variables, and Exception Syntax