Tag

underscore

1 views collected around this technical thread.

Code Mala Tang
Code Mala Tang
Mar 7, 2025 · Fundamentals

Unlock Python’s Secret: Master the Underscore (_) for Cleaner Code

This guide explores the versatile underscore '_' in Python, showing how to discard unwanted variables, simplify loops, improve numeric readability, leverage REPL shortcuts, and why using it as a regular variable is discouraged.

Code readabilityPythonREPL
0 likes · 5 min read
Unlock Python’s Secret: Master the Underscore (_) for Cleaner Code
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.

Name Manglingcode examplesnaming-conventions
0 likes · 11 min read
Understanding Python Underscore Naming Conventions and Name Mangling
Test Development Learning Exchange
Test Development Learning Exchange
Sep 7, 2024 · Fundamentals

Understanding the Underscore (_) in Python: Uses and Conventions

This article explains the versatile uses of the underscore (_) in Python, covering temporary variables in REPL, loop placeholders, tuple unpacking, translation functions, numeric literals, naming‑conflict avoidance, protected and private attributes, and special magic methods, with clear code examples for each case.

Naming Conventioncode-examplesunderscore
0 likes · 6 min read
Understanding the Underscore (_) in Python: Uses and Conventions
Test Development Learning Exchange
Test Development Learning Exchange
Aug 20, 2024 · Fundamentals

Using Single and Double Underscores in Python for Internal Methods, Attributes, and Special Dunder Methods

The article explains how to use single and double underscores in Python to define internal methods, attributes, and special dunder methods such as __init__, __str__, __bool__, __new__, __format__, __eq__, __del__, __copy__, and __deepcopy__, providing usage scenarios and code examples for each.

Backend DevelopmentDunder MethodsPython
0 likes · 8 min read
Using Single and Double Underscores in Python for Internal Methods, Attributes, and Special Dunder Methods
Python Programming Learning Circle
Python Programming Learning Circle
Jun 26, 2024 · Fundamentals

Effective Use of Underscores in Python: Tips and Tricks

This article explains how the underscore character in Python can be leveraged for quick console result reuse, selective tuple unpacking, protected and private attribute naming, and numeric readability, providing practical code examples that illustrate each technique for more efficient and readable code.

Data HandlingPythoncoding-tips
0 likes · 3 min read
Effective Use of Underscores in Python: Tips and Tricks
Python Programming Learning Circle
Python Programming Learning Circle
Apr 29, 2024 · Fundamentals

Leveraging the Underscore (_) in Python: Tips for Console, Data Handling, and Code Aesthetics

This article explains how the underscore character in Python can be used to capture the last console result, ignore unwanted values during unpacking, denote protected or private members in classes, and improve numeric readability, offering practical tips to write cleaner and more efficient code.

Pythoncoding-tipsdata-processing
0 likes · 3 min read
Leveraging the Underscore (_) in Python: Tips for Console, Data Handling, and Code Aesthetics
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Feb 27, 2021 · Operations

Nginx Drops Header Parameters with Underscores by Default – How to Enable Them

The article explains why Nginx silently discards request headers containing underscores, demonstrates the issue with a Spring Boot service and Postman, and shows how adding the 'underscores_in_headers on;' directive resolves the problem.

backenddebuggingheader
0 likes · 5 min read
Nginx Drops Header Parameters with Underscores by Default – How to Enable Them