I don't have a track account. Maybe some day I'll take a look at the
code...
Thanks.
-Adrian.
On Aug 25, 10:39 pm, adrian <[EMAIL PROTECTED]> wrote:
> The example they gave would be enough:
>
> For a digraph with multiple edges and labels, one must provide a list
> within the dictionary:
>
> sage: G=DiGraph({1:{1:['hola','hi'], 2:['two','dos']},2:{1:['one']}},
> loops=True, multiedges=True)
> sage: G.edges()
> [(1, 1, 'hi'), (1, 1, 'hola'), (1, 2, 'dos'), (1, 2, 'two'), (2, 1,
> 'one')]
>
> This would be enough, but I think that somewhere in the code there
> would be something like:
> for i in l:
>
> and the code assumes that l is a list. But if someone does what I did
> and passes a string, the code still works, but has the behavior I
> saw. It would be good to do a checkup like
>
> If type(l)<>list: print "please type a list"; raise "error"...
>
> But I am happy if it gets into the documentation, which is where I
> would look for.
>
> Thank you.
>
> -Adrian.
>
> On Aug 25, 8:46 am, Jason Grout <[EMAIL PROTECTED]> wrote:
>
> > adrian wrote:
> > > I now get it, when I said {1:{1:'hola'}... it understood {1:
> > > {1:list('hola').... and hence treated hola as a list.
>
> > > I don't recall reading that one should input as a list if one selects
> > > multiedges, at least I don't recall seeing an example with that
> > > notation. This is, I think a little bit of a tricky thing, since the
> > > notation works for regular graphs.
>
> > > At least I know what to do now. But I don't know if the behavior here
> > > is intended. Probably it works like that to have a short way of
> > > entering several edges with one level. Or the authors did not intend
> > > it to work that way, in which case it could be fixed.
>
> > > One example with that behavior in the documentation would be great.
>
> > > Thanks a bunch.
> > > -Adrian.
>
> > Do you have a trac account? Would you like to post an example you think
> > makes the documentation clearer? If you don't have a trac account, you
> > can get one by emailing mabshoff (see the instructions
> > onhttp://wiki.sagemath.org/TracGuidelines) or you can just reply here and
> > give the input and output of a command to go into the EXAMPLES section
> > of the documentation. You can precede that command with an explanation,
> > too.
>
> > Thanks,
>
> > Jason
--~--~---------~--~----~------------~-------~--~----~
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-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---