#9706: Symbolic Chebyshev polynomials
-------------------------------------+-------------------------------------
       Reporter:  maldun             |        Owner:  burcin, maldun
           Type:  enhancement        |       Status:  positive_review
       Priority:  major              |    Milestone:  sage-6.1
      Component:  symbolics          |   Resolution:
       Keywords:  orthogonal         |    Merged in:
  polynomials, symbolics             |    Reviewers:  Burcin Erocal, Travis
        Authors:  Stefan Reiterer    |  Scrimshaw, Stefan Reiterer, Jeroen
Report Upstream:  N/A                |  Demeyer
         Branch:                     |  Work issues:
   Dependencies:  #864, #9640,       |       Commit:
  #10018, #11868, #15422             |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by jdemeyer):

 I also don't agree with all changes of
 {{{
 if condition:
     return A
 else:
     return B
 }}}
 to
 {{{
 if condition:
     return A
 return B
 }}}
 but I guess that's one of your pet peeves.

 I personally prefer
 {{{
 if condition:
     return A
 else:
     return B
 }}}
 if there are clearly two cases and the code might as well have been
 written as
 {{{
 if not condition:
     return B
 else:
     return A
 }}}

 So I personally would keep the `if/else` structure for the `if n % 2 == 0`
 test. And for the `n >= 0` test, I would say that
 {{{
 if n < 0:
     return B
 return A
 }}}
 would be a lot better that what you did:
 {{{
 if n >= 0:
     return A
 return B
 }}}
 The first feels much better to me because you put the normal case outside
 the `if` block and the special cases `if n == 0` and `if n < 0` would be
 inside `if`s.

 (Of course these are all personal preferences, I'm not asking you to
 change this, maybe just think about it.)

--
Ticket URL: <http://trac.sagemath.org/ticket/9706#comment:126>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to