Answers for "final class variable python"

1

final class variable python

# you can access this using properties(getter, setter) and 
# define only the getter

class a:
  def __init__(self, name):
    self.__name = name
  
  @property
  def name(self):
    return self.__name
Posted by: Guest on June-10-2020

Python Answers by Framework

Browse Popular Code Answers by Language