[Python-ideas] Yield-from: Mysterious doctest failures

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Feb 21 09:23:36 CET 2009

Steven D'Aprano wrote:
> Greg Ewing wrote:

>>     SyntaxError: assignment to yield expression not possible (<doctest 
>> test.test_generators.__test__.coroutine[23]>, line 1)

>>      SyntaxError: assignment to yield expression not possible 
>> (<doctest test.test_generators.__test__.coroutine[22]>, line 1)

> The index in the coroutines are different: 23 expected, 22 got.

Okay, got it now. I had removed some tests concerning
return with value in generators, and that changed the
numbering of the tests.

> Also, unless it's an artifact of either your or my mail client, there's 
> a spurious space *before* the SyntaxError exception.

It's not an artifact -- I noticed that too, and I'm just
as mystified. I haven't touched anything anywhere near
whatever produces those messages!

It doesn't seem to stop the tests from passing, though,
so I'm happy now.


More information about the Python-ideas mailing list