[Tutor] order of arguments in function
Eike Welk
eike.welk at post.rwth-aachen.de
Thu Dec 7 00:56:26 CET 2006
On Wednesday 06 December 2006 13:29, Dick Moores wrote:
> I meant that the order "min, max" is more intuitive than "max,
> min". Don't you agree? And it's the order used in random.randint(),
> random.randrange(), and random.uniform(), for examples.
What about two intuitively named functions, like the random module
does it?
my_function_range(min, max):
#do the sophisticated myfunction work here
my_function_max(max):
return my_function_range(0, max)
Eike.
More information about the Tutor
mailing list