[issue20959] print gives wrong error when printing *generator

2014-03-18 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. And thanks for noting the duplicate, Martin. -- nosy: +ned.deily resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Function calls taking a generator as star argument can mask TypeErrors in

[issue20959] print gives wrong error when printing *generator

2014-03-18 Thread Martin Panter
Martin Panter added the comment: Yet another duplicate of Issue 4806, by the looks -- nosy: +vadmium ___ Python tracker ___ ___ Python

[issue20959] print gives wrong error when printing *generator

2014-03-17 Thread Jurjen N.E. Bos
New submission from Jurjen N.E. Bos: One of the more interesting ways to use print is printing output of a generator, as print(*generator()). But if the generator generates a typeError, you get a very unhelpful error message: >>> #the way it works OK >>> def f(): yield 'a'+'b' ... >>> print(*f(