Tagged articles
2 articles
Page 1 of 1
Python Programming Learning Circle
Python Programming Learning Circle
Jan 2, 2024 · Fundamentals

Common Bad Practices in Python and How to Avoid Them

This article highlights several typical Python pitfalls—including mutable default arguments, improper file handling, catching overly broad exceptions, misunderstanding the for‑else construct, and inefficient dictionary iteration—and provides clearer, more reliable alternatives for each case.

Exceptionsbest practicescode quality
0 likes · 5 min read
Common Bad Practices in Python and How to Avoid Them
MaGe Linux Operations
MaGe Linux Operations
Jun 4, 2021 · Fundamentals

13 Common Python Pitfalls Every Developer Should Avoid

This article explains the most frequent Python traps—such as mutable default arguments, subtle differences between x+=y and x=y+y, tuple syntax, list mutability, iteration pitfalls, closure binding, import quirks, version incompatibilities, and GIL—providing clear examples and practical solutions.

PitfallsPythonbest-practices
0 likes · 13 min read
13 Common Python Pitfalls Every Developer Should Avoid