calling protected member of base class traceback (most recent call last)file "/home/ fb dfba dd eb py"line in print(obj aattributeerror'baseobject has no attribute ' data hiding what is data hidingdata hiding is part of object-oriented programmingwhich is generally used to hide the data information from the user it includes internal object details such as data membersinternal working it maintained the data integrity and restricted access to the class member the main working of data hiding is that it combines the data and functions into single unit to conceal data within class we cannot directly access the data from outside the class this process is also known as the data encapsulation it is done by hiding the working information to user in the processwe declare class members as private so that no other class can access these data members it is accessible only within the class data hiding in pythonpython is the most popular programming language as it applies in every technical domain and has straightforward syntax and vast libraries in the official python documentationdata hiding isolates the client from part of program implementation some of the essential members must be hidden from the user programs or modules only reflected how we could use thembut users cannot be familiar with how the application works thus it provides security and avoiding dependency as well we can perform data hiding in python using the __ double underscore before prefix this makes the class members private and inaccessible to the other classes example class counterclass__privatecount