https://pantsbuild.org/ logo
#development
Title
# development
a

average-vr-56795

10/18/2018, 11:33 AM
Also (maybe a python thing? Maybe an is thing?) I can’t just write
yield Get(...)
, I need to
result = yield Get(...) ; yield result
w

witty-crayon-22786

10/18/2018, 3:34 PM
what would that mean?
oh, i see what you're saying.
there shouldn't be any need to
yield Get(..)
, because that would imply that there is a conversion from LHS to RHS
and your rule should yield the RHS rather than the more specific thing
...more/less?
a

average-vr-56795

10/18/2018, 3:36 PM
For an aggregate-ish thing, I was looking at:
Copy code
... do some stuff
for target in targets:
  yield Get(Foo, Bar, bar)
but I that just doesn’t work because we don’t yield into collections; you can only yield once in the function?
w

witty-crayon-22786

10/18/2018, 3:37 PM
well, when you yield in a method body, that method becomes a generator
if you yield in a nested method, that nested method beceomes generator
a
@rule
could/can consume a nested generator... it just wouldn't be the engine consuming it