<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="auto"><div class="gmail_quote">
Andrew Barnert <<a href="mailto:abarnert@yahoo.com" target="_blank">abarnert@yahoo.com</a>> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><div class="h5">But the point is that str.join doesn't use a one-pass algorithm, it just constructs a list so it can do it in two passes. And it's been suggested on this thread that variance could easily do the same thing.<div>
<br></div><div>.. snip<br></div><br><div>I think you still may be right that the error is the way to go. You'll learn the problem quickly, and the workaround will be obvious, and the
reason for it will be available in the docs. The other two potential surprises may not be as discoverable.<br></div></div></div></blockquote></div></div></div></blockquote><div><br><div>I agree that the error is the way to go, but what about `variance(iterable, one_pass=True)` defaulting to False,
with an exception that says "Warning: passing an iterable and using the one pass algorithm
can lead to a slight loss in accuracy" if an iterable is passed in?<br><br></div>Normally
the stdlib accepts iterables anywhere a concrete collection works, but
normally also passing in an iterable doesn't change the semantics of a function.<br><br></div><div>brandon<br></div></div></div></div>