Name Mangling Python

Published: 16 May 2021
on channel: Kenny Yip Coding
2,289
67

Data hiding with private fields/methods using name mangling in Python. In Python, there is no true dating hiding with private fields/methods; however you can replicate the behavior using name mangling. Name mangling causes the attribute with double underscores to become ClassName_ attribute internally within Python. Therefore, you can still access these methods by accessing the fields/methods via ClassName_ attribute.

Python Playlist:
   • Python Data Structures and Algorithms  

Github: https://github.com/ImKennyYip/python-...

Subscribe for more coding tutorials 😄!