[issue28942] await expressions in f-strings

2017-12-20 Thread Yury Selivanov
Yury Selivanov added the comment: Looks like it's working now: import asyncio async def foo(): return 32 async def bar(): print(f'{await foo()}') asyncio.run(bar()) Prints: 32 -- resolution: -> not a bug stage: ->

[issue28942] await expressions in f-strings

2017-12-20 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks, I'll take a look. -- ___ Python tracker ___

[issue28942] await expressions in f-strings

2017-12-20 Thread Andrew Svetlov
Change by Andrew Svetlov : -- versions: +Python 3.7 -Python 3.6 ___ Python tracker ___

[issue28942] await expressions in f-strings

2017-12-20 Thread Andrew Svetlov
Andrew Svetlov added the comment: Yury, ping. -- nosy: +asvetlov ___ Python tracker ___

[issue28942] await expressions in f-strings

2016-12-12 Thread Yury Selivanov
Yury Selivanov added the comment: > I was going to say "no", but given that "yield" works, I think it is reasonable to allow "await" as well. (And what about "yield from"?) Agree. I suspect the reason is that async/await aren't proper keywords in 3.5/3.6, and the hacks we have in tokenizer to

[issue28942] await expressions in f-strings

2016-12-12 Thread Guido van Rossum
Guido van Rossum added the comment: I was going to say "no", but given that "yield" works, I think it is reasonable to allow "await" as well. (And what about "yield from"?) -- ___ Python tracker

[issue28942] await expressions in f-strings

2016-12-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +eric.smith ___ Python tracker ___ ___

[issue28942] await expressions in f-strings

2016-12-12 Thread Adam Gregory
Adam Gregory added the comment: Replicated in CPython 3.6.0rc1 -- ___ Python tracker ___ ___ Python-bugs-list

[issue28942] await expressions in f-strings

2016-12-12 Thread Adam Gregory
New submission from Adam Gregory: Hi, I've been playing with f-strings, which seem like a great addition to the language. I noticed in the definition of f_expression that it can include any or_expr. As far as I understand, this includes "await" expressions, so I tried using await inside an