digestweb.dev
Propose a News Source
Support usSponsor
🤝
Curated byFRSOURCE

digestweb.dev

Your essential dose of webdev and AI news, handpicked.

Advertisement

Want to reach web developers daily?

Advertise with us ↗

Back to Daily Feed

Python 3.15 Soft-Deprecates `re.match()` for Clarity

Worth Reading

Originally published on Simon Willison's Weblog by Simon Willison

View Original Article
Share this article:
Python 3.15 Soft-Deprecates `re.match()` for Clarity

Summary & Key Takeaways ​

  • Python 3.15 is soft-deprecating the re.match() function.
  • A new, clearer alternative, re.prefixmatch(), has been introduced.
  • re.prefixmatch() explicitly reflects that it anchors at the beginning of the string.
  • Developers are often better served by re.search() or re.fullmatch().
  • Soft deprecation means the API should not be used for new code but won't be removed soon.

Our Commentary ​

Oh, re.match(). The source of so much confusion for new Pythonistas. I've definitely seen my share of bugs caused by misunderstanding its behavior. Soft-deprecating it and introducing re.prefixmatch() is a fantastic move for developer experience. It's a small change, but it cleans up a long-standing footgun. This is how languages evolve gracefully.

View Original Article
Share this article:
RSS Atom JSON Feed
© 2026 digestweb.dev — brought to you by  FRSOURCE