Nils Bruin wrote: > On Sep 8, 3:38 am, Jason Grout <[email protected]> wrote: >> Would it be pythonic enough to have n(pi/2,pi,2*pi) return a list of >> three values? That way we could do: >> >> n(*my_list) >> >> Note that min, max, and other functions work something like this, in >> that they accept a variable number of arguments. > > They do, but the type of the return value does not depend on the > number of arguments given. > > The function n(1) should definitely give 1.0 back. But n(1,2) ? Should > that give back [1.0,2.0] ?
It should give back (1.0, 2.0), just as if the function had been defined: return n(1), n(2) I think that would probably be the most pythonic thing to do; treat n as returning multiple values. Jason -- Jason Grout --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to [email protected] To unsubscribe from this group, send an email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
