#5936: result of graph query should be iterable -- make more pythonic
--------------------------+-------------------------------------------------
Reporter: was | Owner: rlm
Type: enhancement | Status: new
Priority: major | Milestone: sage-4.0
Component: graph theory | Keywords:
--------------------------+-------------------------------------------------
Currently we have this:
{{{
sage: Q = GraphQuery(
display_cols=['graph6','num_vertices','degree_sequence'],
num_edges=['<=',5],min_degree=1)
sage: for G in Q: print G
}}}
outputs
{{{
Traceback (click to the left for traceback)
...
TypeError: 'GraphQuery' object is not iterable
}}}
Why not have it Q.__iter__() return an iterator over
{{{Q.get_graphs_list()}}}, which would easily work?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5936>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---