hundreds-breakfast-49010
10/01/2019, 1:02 AM@rule
that has a signature Tuple[X]
, and then use that?aloof-angle-91616
10/01/2019, 1:03 AMCollection.of
hundreds-father-404
10/01/2019, 1:03 AMTuple[X]
!= Tuple[X, ...]
hundreds-breakfast-49010
10/01/2019, 1:03 AMhundreds-father-404
10/01/2019, 1:03 AMTuple[X]
== tuple of 1 element of type X
Tuple[X, ...]
== tuple of n elements of type Xhundreds-breakfast-49010
10/01/2019, 1:03 AM@rule\ndef my_rule(x: Collection.of(WhateverType)) -> OutputType:...
x = yield Get(OutputType, WhateverType, (a, b, c,))
?aloof-angle-91616
10/01/2019, 1:04 AMsrc/python/pants/engine/build_files.py
for how it's usedCollectionOfWhatever = Collection.of(WhateverType)
hundreds-breakfast-49010
10/01/2019, 1:04 AMwitty-crayon-22786
10/01/2019, 4:00 PMaloof-angle-91616
10/01/2019, 4:01 PMTuple[...]
as @hundreds-father-404 was saying is the type ascriptionwitty-crayon-22786
10/01/2019, 4:02 PMaloof-angle-91616
10/01/2019, 4:02 PMTuple[X, X, X, X, X, ...]
witty-crayon-22786
10/01/2019, 4:03 PMaloof-angle-91616
10/01/2019, 4:03 PMwitty-crayon-22786
10/01/2019, 4:05 PMCollection.of
Tuple[*X]
syntax? varargs?aloof-angle-91616
10/01/2019, 4:06 PMhundreds-breakfast-49010
10/01/2019, 5:17 PMaloof-angle-91616
10/01/2019, 6:33 PMwitty-crayon-22786
10/01/2019, 6:34 PMhundreds-breakfast-49010
10/01/2019, 6:36 PMPythonTargetAdaptor
witty-crayon-22786
10/01/2019, 6:40 PMhundreds-breakfast-49010
10/01/2019, 6:43 PM@rule
witty-crayon-22786
10/01/2019, 6:47 PM@rule
when compared to using a private function.aloof-angle-91616
10/01/2019, 9:43 PM