I am new to Python OOP.
Consider this code snippet below:
class LinearTopo(Topo):
def __init__(self, k=2, **opts):
Topo.__init__(self, **opts)
...
...
LinearTopo(k=4) # Not passing the **opts argument
I believe, **opts is an essential argument which is needed for creating an object of class LinearTopo
. However, Python allows to create objects of class LinearTopo
without this argument. Could someone explain, how it is possible ?