I dont know how to limit the values of a class attribute in python, so is it a good practise limit the values with a set function?
class Example:
   def __init__(self,name):
      self._setName(name)
   def _setName(self,name):
      if isinstance(name,str):
            self.name = name
