On Wed, 21 Jun 2006 17:55:14 -0700, Bob Ippolito <[EMAIL PROTECTED]> wrote:
>
>On Jun 21, 2006, at 5:18 PM, Moe Aboulkheir wrote:
>>...wanting to know the mean of a bunch of nested lists  is such a 
>>bizarre request that i don't think it's unreasonable to  require that the 
>>caller flattens the arguments.
>
>That's basically a side-effect of allowing both mean([1,2,3]) and mean 
>(1,2,3) via flattenArguments.

i'm not so sure that the two character win of mean(1, 2, 3) over mean([1, 2, 
3]) is worth it.  debugging javascript is troublesome as it is, and returning a 
result for ambiguous/nonsense inputs like 1, [2, [3]] can't help, especially 
when it's inconsistent with the behaviour of similar functions in the same 
library - e.g. MochiKit.Iter.sum(1, [2, [3]]) -> ValueError: "1 is not 
iterable" (and confusingly, MochiKit.Iter.sum([1, [2, [3]]]) -> "12,3" in MK 
1.4)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---

Reply via email to