Python Access Modifiers: Public, Private, and Protected Variablesby@kianooshsanatkar
2,091 reads
2,091 reads

Python Access Modifiers: Public, Private, and Protected Variables

by Kianoosh Sanatkar3mApril 16th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

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
Kianoosh Sanatkar

Kianoosh Sanatkar

@kianooshsanatkar

Just an enthusiastic geek 🤓 who loves nature, science, and developing software 🤘🤘

Learn More
LEARN MORE ABOUT @KIANOOSHSANATKAR'S
EXPERTISE AND PLACE ON THE INTERNET.

Share Your Thoughts

About Author

Kianoosh Sanatkar HackerNoon profile picture
Kianoosh Sanatkar@kianooshsanatkar
Just an enthusiastic geek 🤓 who loves nature, science, and developing software 🤘🤘

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
L O A D I N G
. . . comments & more!