I'm reading a book of Algorithms in Python, and I'm also new to Python.
I can't understand this example:
class Bunch(dict):
def __init__(self, *args, **kwds):
super(Bunch, self).__init__(*args, **kwds)
self.__dict__ = self
x = Bunch(name="Jayne Cobb", position="Public Relations")
print x.name
Some questions:
- What is the meaning of the * and the ** in the parameters "args" and "kwds"?
- What is the meaning of "super"?
- In this classe we are extending the "dict" class? This is a built-in class?
Best Regards,