Hi, please look at the following example. sage: print two_squares(3437458237428) Traceback (most recent call last): ... ValueError: 3437458237428 is not a sum of 2 squares
The ouput is an error message. Thus if I want to test several cases, I have to check each case like: sage: for k in xrange(10): ... try: ... print two_squares(3437458237428-k), 3437458237428-k ... except: ... pass (519651, 1779725) 3437458237426 Why is the output not someting like []? This seems (to me) more natural, and as Python skips automatically an empty list, programming is easier, lines are shorter and more readable IMHO. It is also faster. My question is whether there are good reasons to raise a valueError message as output? Roland -- You received this message because you are subscribed to the Google Groups "sage-support" 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-support. For more options, visit https://groups.google.com/d/optout.
