#13306: Generators for chessboard graphs: King, Queen, Knight, Bishop, Rooks
------------------------------------+---------------------------------------
       Reporter:  dcoudert          |         Owner:  jason, ncohen, rlm
           Type:  enhancement       |        Status:  needs_review      
       Priority:  major             |     Milestone:  sage-5.4          
      Component:  graph theory      |    Resolution:                    
       Keywords:  graph, generator  |   Work issues:                    
Report Upstream:  N/A               |     Reviewers:  Sebastian Luther  
        Authors:  David Coudert     |     Merged in:                    
   Dependencies:                    |      Stopgaps:                    
------------------------------------+---------------------------------------

Comment (by ncohen):

 Helloooooooooooooooooooooooooooooo !!

 Well, that patch was muuuuuuch cleaner than I feared, given its size `:-)`

 Here is a list of comments, and a small innocent reviewer's patch.

     * Default values : rook = True, bishop = True, knight = False : that's
 weird. Why not set them all to True or all to False ?
     * dim_list : it takes any iterable as an input, and you say that it
 takes sets or even dicts ! That's asking for trouble because the order in
 which the elements are listed in sets and dicts is platform-dependent, but
 then you specifically SORT the elements by key value when the inout is a
 dict, and take the VALUES into account. That's not what it is expected. A
 dict is an iterable, but list(my_dict) lists its keys, not values ! It
 would make more sense to remove the part of the code that deals with dict
 (why especially dicts, by the way ? One can make custom iterables !), and
 just use your ``dim = list(dim_list)`` which is perfect as it is.
     * I replaced "at least" or "least" by ">=". This way you know whether
 ">=" or ">" is intended, which is never clear with "at least" :-P
     * Replaced a block of code by itertools.product
     * Added many "`" for tuples that could appear in LaTeX instead.

 Nathann

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13306#comment:35>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
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-trac?hl=en.

Reply via email to