← Înapoi la Urmăritori

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 4
  1. Since 3.11 attribute access has not been a dict lookup, and reading __dict__ once takes the specialized path away for good - Start with the oldest performance tip in Python.

  2. Cancellation in asyncio is a counter, not a flag — and TaskGroup only knew how to check it for zero - Here is a program that wraps a task group in a half-second timeout, and then does not time out: import asyncio async def worker(): try: await asyncio.sle…

  3. PEP 749 put the annotation set in globals(), and SET_ADD never checked that its operand was still a set - Here is a complete Python program that, until last week, crashed every CPython that has annotations lazily evaluated — 3.14, 3.15, and 3.16: __condit…

  4. Under free-threading, a task could be running and missing from all_tasks() at the same time - The job of asyncio.all_tasks() is to return all active tasks in the event loop.