◐ Shell
clean mode source ↗

Message 148977 - Python tracker

Thanks for the updated links Nick.

There is a comment in the docs that recommends putting parentheses around any yield expression that returns a value.  So it is in agreement with that in the function argument case.

The grammar I used does keep it as a variant.

    yield_expr 'yield' [testlist | yield_from]
    yield_from 'from' test

The purpose of doing that is so I can do ...

    yield_expr 'yield' [testlist | yield_from | yield_raise]
    yield_from 'from' test
    yield_raise 'raise' [test ['from' test]]

The yield_raise part is only an interesting exercise to help me understand cpythons internals better.  I'm getting there and hope to be able to contribute to more bug fixes, and patches. :-)