And what would you think about moving the current syntax for edges (u,v,label) to (frozenset_of_two_elements,label) ?
Nathann On Nov 16, 3:26 pm, Jason Grout <[email protected]> wrote: > Nathann Cohen wrote: > > Hello !!! > > > I always have to include in my graphs functions some part of code to > > deal with the fact that for undirected graphs edges can be returned as > > (u,v) or as (v,u), which my code does not like.... Isn't there a Sage a > > type of variable which is both immutable and not ordered ? > > > I'd love to have something like Set(u,v) but I also need it to be > > immutable, hashable, etc... ;-) > > frozenset would be the python answer to your question. I'm not sure if > Sage has a better answer: > > http://docs.python.org/library/stdtypes.html#set-types-set-frozenset > > Jason > > -- > Jason Grout --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to [email protected] To unsubscribe from this group, send an email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
