Why is "call expr" a more enticing syntax than "yield *expr" ? On Thu, Feb 5, 2009 at 9:31 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote: > Guido van Rossum wrote: > >> What's so special about your proposal that requires a new keyword? > > I was thinking about the proposals that are made > from time to time for things like > > yield *foo > > to yield all the items from a sub-generator. I was > also thinking about what could be done to make > using generators as coroutines more convenient, > and I came up with the idea of a new statement > > call expr > > which would be equivalent to > > for x in expr: > yield x > > This happens to be the same as what "yield *" > would do, so it kind of unifies the two issues. > > -- > Greg > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > http://mail.python.org/mailman/options/python-dev/guido%40python.org > -- --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4