This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients Lucas Wiman, Sumudu.Fernando, eric.araujo, falsetru, nneonneo, rhettinger, terry.reedy, tim.peters, yegle
Date 2016-09-18.00:09:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1474157355.23.0.221299562666.issue10109@psf.upfronthosting.co.za>
In-reply-to
Content
Lucas, I largely agree, but it is documented that the various combinatorial generators emit items in a particular lexicographic order.  So that is documented, and programs definitely rely on it.

That's why, in an earlier comment, Terry suggested that perhaps `product()` could make a special case of its (and only its) first argument (and only when repeat=1).  Each element of the first iterable is needed only once (although it may copied into any number of outputs), so there's no actual need to make a tuple of it first.  The implementation is just simpler and clearer by treating all arguments alike.

Which is a good enough reason for me - and the "use cases" for an unbounded first argument look exceptionally weak to me.
History
Date User Action Args
2016-09-18 00:09:15tim.peterssetrecipients: + tim.peters, rhettinger, terry.reedy, falsetru, nneonneo, eric.araujo, Sumudu.Fernando, yegle, Lucas Wiman
2016-09-18 00:09:15tim.peterssetmessageid: <1474157355.23.0.221299562666.issue10109@psf.upfronthosting.co.za>
2016-09-18 00:09:15tim.peterslinkissue10109 messages
2016-09-18 00:09:14tim.peterscreate