itertools.product - missing documentation of usage of *
![](https://secure.gravatar.com/avatar/43e0741ff6ae225ff2f84486c3d3c067.jpg?s=120&d=mm&r=g)
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@dematic.com<mailto:bjorn.madsen@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>
participants (1)
-
Madsen, Bjorn