A function in Python is a first class object. In the code below, f is defined
inside of gen_datapath_join_callback, and you get a new f. Since a function is
just an object, gen_datapath_join_callback then adds a new property to f -- the
cb property. Inside f, this property is accessed.
I
The definition of register_handler is in pycontext.cc in pyrt. It's exposed to
Python via SWIG.
-- Murphy
On Nov 2, 2011, at 10:14 PM, hzy wrote:
the code problem I have solved after I looked the python books about function.
but, when I look the codes in the core.py.
def
pyswitch is intended to be a very simple demo and does something along the
lines of making each switch in the network a standalone L2 learning switch.
Each switch gets no insight about the topology from its neighbors. routing
actually uses a global view of the topology, and can just generate