Tagged articles
3 articles
Page 1 of 1
Test Development Learning Exchange
Test Development Learning Exchange
Jun 23, 2025 · Fundamentals

Master Python Function Arguments: Positional, Keyword, Default, *args, **kwargs

This guide walks through ten Python function‑argument examples—including positional, keyword, default values, mutable‑default pitfalls, variable‑length *args and **kwargs, argument unpacking, ordering rules, and mutable‑object handling—providing clear code snippets and explanations for each case.

Function ArgumentsPythonargs-kwargs
0 likes · 7 min read
Master Python Function Arguments: Positional, Keyword, Default, *args, **kwargs
Test Development Learning Exchange
Test Development Learning Exchange
May 25, 2025 · Fundamentals

Master Python Functions: Syntax, Parameters, Defaults, and Advanced Tricks

This guide explains how to define Python functions, the role of return statements, differences between positional and keyword arguments, default‑parameter pitfalls, *args/**kwargs usage, argument unpacking, reference passing semantics, positional‑only/keyword‑only parameters, and anonymous lambda functions, all with clear code examples.

LambdaPythonargs-kwargs
0 likes · 6 min read
Master Python Functions: Syntax, Parameters, Defaults, and Advanced Tricks
Code Mala Tang
Code Mala Tang
Jan 19, 2025 · Fundamentals

Master the 6 Most Common Python Pitfalls and How to Avoid Them

This article explores six frequently misunderstood Python features—mutable default arguments, the difference between is and ==, *args/**kwargs, iterator exhaustion, complex list comprehensions, and the global keyword—explaining why they trip developers up and offering clear, practical solutions to master each one.

PitfallsPythonargs-kwargs
0 likes · 8 min read
Master the 6 Most Common Python Pitfalls and How to Avoid Them