uv: the Python tool that replaces pip, venv, and pyenv
PythonBit chewy看中文版

uv: the Python tool that replaces pip, venv, and pyenv

uv is Astral's Rust-written Python tool that folds pip, venv, pyenv, and pipx into one command — and installs packages several times faster. What it replaces, how fast it really is, and whether you should switch.

2026-06-28 · 3 min read · 1055 words · KbWen · EN
uv 是什麼?把 pip、venv、pyenv 收進一個指令
Python要花點腦Read in English

uv 是什麼?把 pip、venv、pyenv 收進一個指令

uv 是 Astral 用 Rust 寫的 Python 套件工具,把 pip、venv、pyenv、pipx 收進同一個指令,安裝又快上好幾倍。聊一下它取代了哪些東西、快多少,還有要不要換。

2026-06-28 · 5 min read · 2256 words · KbWen · ZH
Python f-string:你可能只用到一半
Python要花點腦

Python f-string:你可能只用到一半

f-string 不只是 f"{變數}"。冒號後面的格式設定、3.8 的 = 自我說明、3.12(PEP 701)鬆綁的同引號巢狀與跨行,一層一層看完,順便聊什麼時候別用它。

2026-06-28 · 4 min read · 1875 words · KbWen · ZH
Python lambda 什麼時候該用、什麼時候別用
Python要花點腦

Python lambda 什麼時候該用、什麼時候別用

lambda 語法五分鐘學得會,難的是什麼時候用。聊它真正的家(sorted 的 key=)、PEP 8 為什麼叫你別把它綁給變數,還有迴圈裡三個 lambda 都回同一個值的陷阱。

2026-06-28 · 3 min read · 1486 words · KbWen · ZH
Python List Comprehensions: Read Them as For-Loops
Python看中文版

Python List Comprehensions: Read Them as For-Loops

A relaxed take on Python list comprehensions: translate them back into the equivalent for-loop, and check what's actually true about variable leaking and speed on Python 3.14.

2026-05-31 · 9 min read · 1867 words · KbWen · EN
Python 列表推導式:一行取代 for 迴圈
Python輕鬆讀Read in English

Python 列表推導式:一行取代 for 迴圈

用比較白話的方式聊 Python 列表推導式:把它翻回普通的 for 迴圈來看,順便用 Python 3.14 實測一下變數外洩跟效能到底是怎樣。

2026-05-31 · 7 min read · 3348 words · KbWen · ZH