logoalt Hacker News

memco12/10/20251 replyview on HN

I think this is a valid question for this specific case, but may not always be possible. That said, I think as a user I would probably prefer it if under the hood the old function called the new so they can deprecate the behavior without breaking the API. In that way you can still emit the deprecation warning while also only having one actual code path to maintain.


Replies

shadowgovt12/10/2025

Funny enough, in Python, a sufficiently-dedicated client can also do this on their end by just monkey-patching the class definition.