Soft-deprecating re.match() 0 ▲ Hugo van Kemenade 1 hour ago · Tech · hide · 0 comments Quick, without looking it up, what does re.match() do? Which of these return a match? import re re.match("pi", "pi") re.match("pi", "pie") re.match("pi", "api") re.match("pi", "magpie") How does it compare to re.search() and re.fullmatch()? Whilst you’re (quickly) thinking about it, let’s introduce soft deprecation. Soft deprecation #Python’s backwards compatibility policy (PEP 387) introduced soft deprecation in 2023: A soft deprecation can be used when using an API which should no longer be used to write new code, but it remains safe to continue using it in existing code. The API remains documented and tested, but will not be developed further (no enhancement). A soft deprecation does not imply future removal of the API, nor does it issue a warning. It’s a docs-only recommendation to not use an API, ideally with a suggested replacement. It’s a completely separate decision whether, if ever, to turn a soft deprecation into a regular “hard” deprecation (where removal may follow); soft… No comments yet. Log in to reply on the Fediverse. Comments will appear here.