Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python underscore variable

_var    #- Preferred convention for internal variables and methods
var_    #- Used to avoid naming conflicts with Python keywords
__var   #- Used for name mangling by Python when used in class context
        #- Python interpreter changes the name of the variable to avoid 
#collision with child class
__var__ #- Reserved for special use in the language
        #- Used as a temporary or don't care varaibles
 
PREVIOUS NEXT
Tagged: #python #underscore #variable
ADD COMMENT
Topic
Name
8+5 =