On Wed, Oct 20, 2010 at 3:27 PM, Sebastian <sebastianspublicaddr...@googlemail.com> wrote: > Hi, > Is there a simpler way to yield all elements of a sequence than this? > for x in xs: > yield x
Not presently. There's a related PEP under discussion though: PEP 380: Syntax for Delegating to a Subgenerator http://www.python.org/dev/peps/pep-0380/ It would let you write: yield from xs Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list