Rob Beezer wrote: > On Oct 3, 2:47 am, Nathann Cohen <nathann.co...@gmail.com> wrote: >> DiGraph.out_neighbors() and DiGraph.in_neighbors() would be much easier to >> find and more natural... > > I'd suggest > > neighbors_in() > neighbors_out() > neighbors() > > to make tab completion easier and to group them next to each other > when browsing commands with DiGraph.<tab>, plus the last one is > identical to what is available for "plain" graphs.
We've had this discussion on whether method names should be noun_adjective, or adjective_noun (e.g., left_kernel or kernel_left). Adhering to the convention of English in Sage makes adjective_noun sound better (e.g., left_kernel), but tab completion makes noun_adjective easier to find and groups things together nicely. One way around this difficulty would be to make tab completion smarter. One proposed solution was to enhance tab completion, so that it worked like: sage: m.*kernel*? m.integer_kernel m.kernel m.kernel_matrix m.kernel_on m.left_kernel m.right_kernel in other words, a tab would complete method names where the given text was anywhere in the method name, not just at the start. Another proposal was that a single tab would behave as we have now, but two tabs in a row would do the above m.*kernel*? completion. Note that these tab completions won't group things together on the display, but they will help you find methods easier if we use the adjective_noun convention. On the issue of neighbors, I agree it would be nice to have neighbor functions that were explicit for digraphs that contained the word neighbor. I've needed this before,and remember spending some time to figure out what I needed (i.e., the predecessors function). Thanks, Jason -- Jason Grout --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---