I am working with models of neurons. One class I am designing is a cell class which is a topological description of a neuron (several compartments connected together). It ha
This is similar to the other solutions that iterate through a default dictionary, but it uses a more compact notation:
class MyClass(object): def __init__(self, **kwargs): self.__dict__.update(dict( arg1=123, arg2=345, arg3=678, ), **kwargs)