The boilerplate
    
    def some_gen():
       ...
       for x in some_other_gen():
           yield x
       ...

is so common (including the case where some_other_gen is the same as
some_gen, i.e. it's a recursive call) that I find myself wanting
a more direct way to express it:

    def some_gen():
       ...
       yield *some_other_gen()

comes to mind.  Less clutter, and avoids yet another temp variable
polluting the namespace.

Thoughts?
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to