Topic

pep8

Collection size
2 articles
Page 1 of 1
Python Programming Learning Circle
Python Programming Learning Circle
Feb 19, 2025 · Fundamentals

Understanding Python Underscore Naming Conventions and Name Mangling

This article explains the meaning and conventions of single and double leading, trailing, and surrounding underscores in Python identifiers, shows how name mangling works, and provides practical code examples illustrating their effects on classes, modules, and REPL usage.

Code ExamplesName ManglingNaming Conventions
0 likes · 11 min read
Understanding Python Underscore Naming Conventions and Name Mangling
Python Programming Learning Circle
Python Programming Learning Circle
Aug 1, 2022 · Fundamentals

Understanding Python Underscore Naming Conventions and Name Mangling

This article explains the various meanings of single and double underscores in Python, outlines the five common underscore naming patterns, demonstrates how name mangling works for double‑leading underscores, and shows practical uses of the underscore as a throwaway variable and REPL placeholder.

Name ManglingNaming ConventionsProgramming
0 likes · 11 min read
Understanding Python Underscore Naming Conventions and Name Mangling