[Python-ideas] More alternative names for yield-from

Scott Dial scott+python-ideas at scottdial.com
Fri Feb 20 04:01:51 CET 2009


Greg Ewing wrote:
> I still wish I could find a better name for it.
> Some more ideas:
> 
>   y = suspendable g(x)
> 
>   y = suspending g(x)
> 
>   y = sus g(x)  # if you want something short & snappy
> 

Along with "call", all of these names don't seem to cater to the
majority of people who are going use it as a replacement for the
"for x in i: yield x" pattern. I haven't seen anyone (with that use case
in mind) who has argued that "yield from" was a bad name. OTOH, I have
seen several arguments about the treading use case being questionable,
but maybe I mistakenly associate those words with that use.
Nevertheless, I think there would be a sizable number of people
disappointed to find out "suspendable" is a reserved word.

But, I think if you were going down the other path with names, you would
end up thinking about things like:

   y = yield for g(x)

-Scott

-- 
Scott Dial
scott at scottdial.com
scodial at cs.indiana.edu



More information about the Python-ideas mailing list