A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-August/149006.html below:

[Python-Dev] PEP 550 v4

[Python-Dev] PEP 550 v4 [Python-Dev] PEP 550 v4Ethan Furman ethan at stoneleaf.us
Mon Aug 28 11:26:55 EDT 2017
On 08/28/2017 04:19 AM, Stefan Krah wrote:

> What about this?
>
> async def bar():
>      setcontext(Context(prec=1))
>      for i in range(10):
>          await asyncio.sleep(1)
>          yield i
>
> async def foo():
>      async for i in bar():
>          # ctx.prec=1?
>          print(Decimal(100) / 3)

If I understand correctly, ctx.prec is whatever the default is, because foo comes before bar on the stack, and after the 
current value for i is grabbed bar is no longer executing, and therefore no longer on the stack.  I hope I'm right.  ;)

--
~Ethan~
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4