TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #422 · 30 мар.

Если запустить REPL с модулем asyncio, то вы входите в особый асинхронный REPL. user@host:~$ python -m asyncio asyncio REPL 3.12.7 ... Use "await" directly instead of "asyncio.run()". >>> import asyncio >>> В этом режиме - создаётся и настраивается event loop - уже импортирован asyncio - работает await на верхнем уровне То есть такая команда сработает без ошибок! await asyncio.sleep(3) Удобно для тестирования асинхронных функций без создания ивентлупов и остальной обвязки. Работает в: 3.8+ #tricks#async

Резултати

Пронајдени 1 слични објави

Пребарај: #garbage

当前筛选 #garbage清除筛选
djangoproject

@djangoproject · Post #174 · 22.09.2016 г., 19:16

gc — #Garbage#Collector interface This module provides an interface to the #optional garbage collector. It provides the ability to disable the collector, tune the collection frequency, and set #debugging options. It also provides access to unreachable #objects that the collector found but cannot free. Since the collector supplements the reference counting already used in Python, you can disable the collector if you are sure your program does not create reference cycles. https://docs.python.org/3/library/gc.html