Answers for "how to declare private attribute in python"

1

how to declare private attribute in python

class Base:
	def __init__(self):
    	self.__private_attribute = 2 #two underscores before attribute declare it as private
Posted by: Guest on July-24-2021

Code answers related to "how to declare private attribute in python"

Python Answers by Framework

Browse Popular Code Answers by Language