On Tue, Nov 10, 2009 at 8:59 AM, Steven D'Aprano <st...@remove-this-cybersource.com.au> wrote: > On Sun, 08 Nov 2009 12:31:26 -0500, geremy condra wrote: > >> What you're describing is the powerset operation. Here's the example >> from the python docs: > [...] >> What I find interesting is that running it through timeit, it is much >> slower than the code suggested by Dan Bishop. > > Your test doesn't show what you think it shows. You shouldn't just > blindly apply timeit without testing to see that the functions return > what you think they return. Your test is, I'm afraid, totally bogus and > the conclusion you draw is completely wrong.
<snip> Doh! I even noticed that the asymptotic times didn't match up and still blew right past the obvious answer. Thanks (again) for the correction, Steven. Geremy Condra -- http://mail.python.org/mailman/listinfo/python-list