Typo in code snippet
https://docs.python.org/3/library/asyncio-task.html#shielding-from-cancellat... In this endpoint there is a typo Namely, The statement: task = asyncio.create_task(something()) res = await shield(task) is equivalent to: res = await something() should be The statement: task = asyncio.create_task(something()) res = await shield(task) is equivalent to: res = await shield(something()) Respectfully, Dyussenov Nuraly
Thank you for the report! The typo was fixed in https://github.com/python/cpython/pull/108427 On 22. 08. 23 14:21, Nuraly wrote:
https://docs.python.org/3/library/asyncio-task.html#shielding-from-cancellat... <https://docs.python.org/3/library/asyncio-task.html#shielding-from-cancellation>
In this endpoint there is a typo
Namely,
The statement:
task= asyncio.create_task(something()) res= await shield(task)
is equivalent to:
res= await something()
should be
The statement:
task= asyncio.create_task(something()) res= await shield(task)
is equivalent to:
res= await shield(something())
Respectfully,
Dyussenov Nuraly
_______________________________________________ docs mailing list -- docs@python.org To unsubscribe send an email to docs-leave@python.org https://mail.python.org/mailman3/lists/docs.python.org/ Member address: encukou@gmail.com
participants (2)
-
Nuraly
-
Petr Viktorin