[issue47147] Allow `return yield from`

2022-04-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I concur with Terry. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___

[issue47147] Allow `return yield from`

2022-04-02 Thread Patrick Reader
Patrick Reader added the comment: As the one who wrote the code, I can guarantee you that the StopIteration value is not always None. But I understand your point that for most other users it is always None, and therefore having special syntax might be misleading. --

[issue47147] Allow `return yield from`

2022-04-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think that this should be closed as rejected, and that Patrick should remove the 'return's that are in front of 'yield from ...'. Then 'yield from x' will be a statement, not an expression, and the ()s will not be needed, as they are used to

[issue47147] Allow `return yield from`

2022-03-28 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: In general, anything changing the python syntax needs to be discussed in the mailing lists and it may likely need a PEP as well, even if is minor. This is because this has consequences rippling the whole ecosystem, from IDEs to other parsers and this

[issue47147] Allow `return yield from`

2022-03-28 Thread Patrick Reader
Patrick Reader added the comment: Ok, will do, but what is the bar for a feature to need to go to the mailing lists first? I thought as this was a relatively minor one it wouldn't need to. Is it just because it's an actual syntax change? -- ___

[issue47147] Allow `return yield from`

2022-03-28 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Please, submit an email to python-ideas or python-dev first as this need to be discussed in the mailing lists. -- ___ Python tracker

[issue47147] Allow `return yield from`

2022-03-28 Thread Patrick Reader
New submission from Patrick Reader : I would like to be able to use a `yield from` expression in a `return` statement without parentheses, as a small quality of life tweak, i.e.: return yield from gen instead of return (yield from gen) I think this makes sense, since `yield from`