Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
trac #27160: avoid another py2/py3 tag in graph_coloring
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoudert committed Feb 16, 2019
1 parent 2490bc9 commit c3678ad
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/sage/graphs/graph_coloring.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,10 @@ def all_graph_colorings(G, n, count_only=False, hex_colors=False, vertex_color_d
....: print(c)
{0: 0, 1: 1, 2: 0}
{0: 1, 1: 0, 2: 1}
sage: for c in all_graph_colorings(G, 2, hex_colors=True): # py2
....: print(c) # py2
{'#00ffff': [1], '#ff0000': [0, 2]}
{'#ff0000': [1], '#00ffff': [0, 2]}
sage: for c in all_graph_colorings(G, 2, hex_colors=True): # py3
....: print(c) # py3
{'#ff0000': [0, 2], '#00ffff': [1]}
{'#00ffff': [0, 2], '#ff0000': [1]}
sage: for c in all_graph_colorings(G, 2, hex_colors=True):
....: print(sorted(c.items()))
[('#00ffff', [1]), ('#ff0000', [0, 2])]
[('#00ffff', [0, 2]), ('#ff0000', [1])]
sage: for c in all_graph_colorings(G, 2, hex_colors=True, vertex_color_dict=True):
....: print(c)
{0: '#ff0000', 1: '#00ffff', 2: '#ff0000'}
Expand Down

0 comments on commit c3678ad

Please sign in to comment.