=graph(' ')and so onexample - pp \dstruct\classics\gtestobj py "build class-based graph and run test searchesfrom graph import graph this doesn' work inside def in undefined for name in "abcdefg"exec("% graph('% ')(namename) arcs [begb arcs [cc arcs [ded arcs [fe arcs [cfgg arcs [amake objects first label=variable-name now configure their linksembedded class-instance list search(gfor (startstopin [( , )( , )( , )( , )( , )]print(start search(stop)running this test executes the same sort of graph walkingbut this time it' routed through object methodsc:\pp \dstruct\classicspython gtestobj py [[ecd][egabcd][[ag][aeg][abceg][[gaef][gabcdf][gabcef][gaecdf][[bcega][the results are the same as for the functionsbut node name labels are not quotednodes on path lists here are graph instancesand this class' __repr__ scheme suppresses quotes example - is one last graph test before we move onsketch the nodes and arcs on paper if you have more trouble following the paths than python example - pp \dstruct\classics\gtestobj py from graph import graph graph(' ' graph(' ' graph(' ' graph(' ' arcs [pmp arcs [smaa arcs [mprint( search( ) graph of spam make node objects leads to and arcsembedded objects find all paths from to data structures