Если запустить 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
🚀 Etherscan Enhances Contract Page with New Features
Etherscan has announced a revamp of its contract page, introducing an IDE-style code browser. According to Foresight News, the update includes features such as file tree navigation, multi-file tabs, contract outline jumping, and cross-file keyword search.
The redesign also improves the interaction interface for reading and writing contract pages, aiming to enhance the user experience in reading and operating smart contracts. Users can now switch to full-screen mode and open matching contract codes directly in Blockscan and Ethereum Remix for editing.
#Etherscan#SmartContracts#Blockchain#Ethereum#CodeBrowser#DeveloperTools#Crypto#IDE#BlockchainDevelopment#TechUpdate#ETH