Tag

default arguments

0 views collected around this technical thread.

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.

IteratorsPitfallsPython
0 likes · 8 min read
Master the 6 Most Common Python Pitfalls and How to Avoid Them
php中文网 Courses
php中文网 Courses
Dec 29, 2023 · Backend Development

Understanding PHP Function Parameter Passing: Pass-by-Value, Pass-by-Reference, Default and Variable‑Length Arguments

This article explains PHP function parameter passing, covering pass‑by‑value versus pass‑by‑reference, how to define functions with multiple, default, and variable‑length arguments, and provides clear code examples illustrating each technique for backend developers.

PHPdefault argumentsfunction parameters
0 likes · 4 min read
Understanding PHP Function Parameter Passing: Pass-by-Value, Pass-by-Reference, Default and Variable‑Length Arguments
Python Programming Learning Circle
Python Programming Learning Circle
Feb 27, 2023 · Backend Development

Digg v4 Launch Failure: A Python Default Argument Bug Case Study

The article recounts how a mutable default argument bug in a Python function caused Digg's v4 release to crash, leading to massive performance issues, costly downtime, and ultimately contributing to the company's decline, illustrating key lessons for backend developers.

Diggbackendbug
0 likes · 9 min read
Digg v4 Launch Failure: A Python Default Argument Bug Case Study
Python Programming Learning Circle
Python Programming Learning Circle
Sep 3, 2022 · Backend Development

Digg v4 Launch Failure Caused by a Python Default Argument Bug

A real‑world incident at Digg shows how using a mutable default argument in a Python function caused a cascade of performance problems, leading to a rushed v4 release, service outages, and ultimately the company's decline and acquisition.

Diggbackendbug
0 likes · 9 min read
Digg v4 Launch Failure Caused by a Python Default Argument Bug
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