PulseAugur
实时 15:32:47

Python 3.15 软性弃用令人困惑的 re.match() 函数

Python 编程语言将在其即将发布的 3.15 版本中软性弃用 `re.match()` 函数。这意味着开发者将被建议不要在新代码中使用它,但它不会被移除。此举旨在通过引入更清晰的替代方案 `re.prefixmatch()` 来解决围绕 `re.match()` 的混淆问题,该函数仅匹配字符串的开头。鼓励开发者使用 `re.search()` 来匹配字符串中的任何位置,或使用 `re.fullmatch()` 来匹配整个字符串。 AI

影响 对 AI 开发影响较小,主要影响使用正则表达式的 Python 开发者。

排序理由 对编程语言标准库中特定函数的更改。

在 Simon Willison 阅读 →

AI 生成摘要 · Google Gemini · 来自 1 个来源。 我们如何撰写摘要 →

Python 3.15 软性弃用令人困惑的 re.match() 函数

本文如何被排名

Signal score
22 / 100
Composite score across the factors below. Higher = stronger signal that this story matters right now.
Newsworthiness bucket
Tool
对编程语言标准库中特定函数的更改。
Source corroboration
Single-source cluster
Only one publisher covered this so far. Single-source stories can still rank when the publisher is high-authority, but they lack cross-source corroboration.
Topics
product, other
Editorial topic classification. Feeds into how the story surfaces on /topic/<slug> hub pages and into the per-entity coverage mix.
AI-industry relevance
Standard
On-topic for AI-industry coverage; kept in the public index.
Story freshness
Breaking (< 6h)
Fresh story with cross-source coverage still developing. Ranking may shift as more sources report.

完整方法见我们的编辑标准

报道来源 [1]

  1. Simon Willison TIER_1 English(EN) ·

    Soft-deprecating re.match()

    <p><strong><a href="https://hugovk.dev/blog/2026/soft-deprecating-re.match/">Soft-deprecating re.match()</a></strong></p> Python has a concept of <a href="https://peps.python.org/pep-0387/#soft-deprecation">soft deprecation</a>, where APIs are marked as "should no longer be used …