I would like to know if the use of ** kwargs in a constructor is the best alternative or if there is a better path for cases similar to the ones below:
class Duvida(object):
def __init__(self, **kwargs):
self.formato=''
self.nota='5'
if 'formato' in kwargs.keys():
self.formato=kwargs['formato']
if 'nota' in kwargs.keys():
self.nota=kwargs['nota']
q=Duvida(formato='Formato Personalizado')