[Python-ideas] Powerset

Wes Turner wes.turner at gmail.com
Tue Oct 16 00:31:20 EDT 2018

Is there a name for an iteration of the powerset which is more useful for
binary search? I.e. instead of starting with null set, start with the
"middle" ( r/2 ).

Maybe a bit OT, but is there a name for such a combinatorial search?

On Monday, October 15, 2018, Hasan Diwan <hasan.diwan at gmail.com> wrote:

> > This is certainly the right place to discuss this, but you shouldn't
> > assume that everyone reading will know what powerset functionality you
> > are referring to.
> > Is it the same as the recipe in the itertools documentation?
> Yes pretty much.
> >
> > https://docs.python.org/3/library/itertools.html#itertools-recipes
> >
> > Can you make a case for why it is important and useful enough to be put
> > into the std lib? Every new function increases the burden on both the
> > Python developers maintaining the stdlib, and new users learning to use
> > the language. So you need to make a case for why the benefit outweighs
> > the costs.
> The best case I've come up with is one of obviousness. When looking
> for the powerset implementation in the cpython source, grepping for
> itertools.chain is not an obvious, at least to me, vector for a
> solution. -- H
> --
> OpenPGP: https://sks-keyservers.net/pks/lookup?op=get&search=
> If you wish to request my time, please do so using
> bit.ly/hd1AppointmentRequest.
> Si vous voudrais faire connnaisance, allez a bit.ly/hd1AppointmentRequest.
> Sent from my mobile device
> Envoye de mon portable
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20181016/ce045a19/attachment-0001.html>

More information about the Python-ideas mailing list