> On 2014-09-26 11:46, Peter Bruin wrote: > > Why write a new function for something > > that doesn't seem to be _that_ widely useful, and can easily be > > implemented in two lines (ispower() followed by ispseudoprime())? > To expand on this a bit more: I think the "number of lines in the > implementation" is not a good metric to decide whether or not to include > a function. And perhaps it's clear for you that it's those two lines, it > might not be that clear for everybody (just look at the implementation > of is_prime_power() for proof=False in arith.py) > > My 2 cents. This is a bad metric. If it's a natural question to ask, then it should be a function/method. I can think of many functions which are simple computations (even more so than calling 2 other functions), but it makes the code easier to read and maintain IMO. Plus it's not like there will be thousands of such functions, they don't add much to the size, and they don't add much time to compilation. Best, Travis
-- You received this message because you are subscribed to the Google Groups "sage-devel" 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-devel. For more options, visit https://groups.google.com/d/optout.
