starting variable name with underscore python

Solutions on MaxInterview for starting variable name with underscore python by the best coders in the world

showing results for - "starting variable name with underscore python"
Isabella
24 Jan 2018
1_bar
2#No effect, just hint for the user:
3#“Hey, this isn’t really meant to be a part of the public interface 
4#of this class.
5#Best to leave it alone.”
6__bar
7#protects the variable from getting overridden in subclasses
8__bar__
9#It’s best to stay away from using names that start and 
10#end with double underscores (“dunders”) in your own programs 
11#to avoid collisions with future changes to the Python language.
12#reserved for magic methods