HackerNoon Mobile

Better reading experience on the app
Python Access Modifiers: Public, Private, and Protected Variablesby@kianooshsanatkar
1,860 reads

Python Access Modifiers: Public, Private, and Protected Variables

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

Python Access Modifiers: Public, Private, and Protected Variables are keywords in object-oriented languages that set accessibility of classes, methods, and other members. Python is shaped around the philosophy of “We are all consenting adults here” so there is no information hiding! But there are some conventions as I said earlier. Don’t touch or call anything that starts with ‘_’ in an instance of a class. Use a double-underscore ‘__’ for private variables, this convention is called “name mangling”
featured image - Python Access Modifiers: Public, Private, and Protected Variables
Kianoosh Sanatkar HackerNoon profile picture

@kianooshsanatkar

Kianoosh Sanatkar


Receive Stories from @kianooshsanatkar

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!