Python π
2025 年 10 月 7 日发布了 Python 3.14,今天来看看更新了什么
本篇介绍以下内容
- REPL 更新Internal Link
- template-stringInternal Link
- 更好的报错Internal Link
- except & except*Internal Link
- try...finally 中的 warningInternal Link
- Free-threaded mode (No GIL)Internal Link
Python
View all tags2025 年 10 月 7 日发布了 Python 3.14,今天来看看更新了什么
本篇介绍以下内容
Python’s asyncio library enables you to write concurrent code using the async and await keywords. The core building blocks of async I/O in Python are awaitable objects—most often coroutines—that an event loop schedules and executes asynchronously. This programming model lets you efficiently manage multiple I/O-bound tasks within a single thread of execution
In this tutorial, you’ll learn how Python asyncio works, how to define and run coroutines, and when to use asynchronous programming for better performance in applications that perform I/O-bound tasks
By the end of this tutorial, you’ll understand that:
asyncio provides a framework for writing single-threaded concurrent code using coroutines, event loops, and non-blocking I/O operationsasyncio when your application spends significant time waiting on I/O operations, such as network requests or file access, and you want to run many of these tasks concurrently without creating extra threads or processesThis Article is a repost of Python's asyncio: A Hands-On WalkthroughExternal Link. Only for Chinese Translation and no commercial use. If any violation of copyright, please contact me to delete it
解决报错
ImportError: pycurl: libcurl link-time ssl backend (openssl/nss)
is different from compile-time ssl backend (none/other)
经典问题之 Python 脚本打包为 exe/bin
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range