[docs] itertools.product - missing documentation of usage of *

Madsen, Bjorn Bjorn.Madsen at dematic.com
Fri May 11 09:59:00 EDT 2018


Itertools.product has a "magic" function that isn't documented:

The usage of * as precedent to a list of lists of variable length.

Example:
>>> from itertools import product
>>> list(product(*[[-1,1], [-2,-2.5,2], [-3,3]]))
[(-1, -2, -3), (-1, -2, 3), (-1, -2.5, -3), (-1, -2.5, 3), (-1, 2, -3), (-1, 2, 3), (1, -2, -3), (1, -2, 3), (1, -2.5, -3), (1, -2.5, 3), (1, 2, -3), (1, 2, 3)]

The function works perfectly. The documentation of the usage is missing.
Please add it.

Kind regards

Bjorn Madsen, Ph.D.
Head of System Design Tools
[Beschreibung: Beschreibung: Beschreibung: Dematic Logo]
We Optimise Your Supply Chain

Dematic Limited
Banbury Business Park
Trinity Way
Adderbury
Banbury
OX17 3SN
Phone: +44 (0) 7590 306 987
bjorn.madsen at dematic.com<mailto:bjorn.madsen at dematic.com>
www.dematic.com<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttp-3A__www.dematic.com_%26d%3DDwMFAg%26c%3DKapZzwhopA3IFGTjMLqImrQVuf1cLczLfYDt045Y5_Y%26r%3D0Og4eqfe8mPps1MmMhpO2Zv3zMQhO5MF5hj5B_qOcvo%26m%3DjnuBTxQ_8VdziL9939vkOaaX9LsmWv4Vd0hhr5sSVkU%26s%3DWvxE_osCyWoWlev1vGPVw-S-Wp9SVA7i9nMjuphg_B8%26e%3D&data=01%7C01%7Cmark.pickerill%40dematic.com%7C2bb6273f6c90422e118f08d5438e948d%7Cb87688c18bb44f8698754da105de8eda%7C0&sdata=6kBG2FWhTBq2tof9kSM1ApoGWKoRQjDCIJpnpQ%2Bnkrk%3D&reserved=0>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20180511/43edd728/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 5942 bytes
Desc: image001.gif
URL: <http://mail.python.org/pipermail/docs/attachments/20180511/43edd728/attachment.gif>


More information about the docs mailing list