67 days ago · Tech · hide · Fediverse post

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…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town