On Sun, 9 Aug 2015, Nathann Cohen wrote:

Is this a bug? If not, what is the rationale behind this?

What I know is that it was done deliberately, and I do not know the
rationale. I can "guess" that it was because "you pay for labels", and that
Robert Miller thought that there was no reason to pay for them when the
vertices were labelled with integers.

Sounds reasonable. However, it seems to optimize only numbers from 0 to 9. Here is a test code:

g1 = DiGraph({11:[9]})
print [(x, type(x)) for x in g1.vertices()]
g2 = DiGraph({8:[12]})
print [(x, type(x)) for x in g2.vertices()]

I would say that this is a bug. To what way should this be unified, that I left others to decide.

I have NOT made a trac ticket, and won't look after this for a long time, so hopefully somebody catches this.

--
Jori Mäntysalo

Reply via email to