DrJosiah·12 mesi fa·discussNot when this can be done: https://gist.github.com/josiahcarlson/39ed816e80108093d585df...Take a deep breath.
DrJosiah·12 mesi fa·discussI mean, Python is dynamic. Here, have this: https://gist.github.com/josiahcarlson/39ed816e80108093d585df...Now you don't need to write your double-underscore methods ever again, if you don't want to.
DrJosiah·12 mesi fa·discussI mean, it's never been a problem for me in my 26 years of Python, but if it is such a big deal for you, maybe you should consider this: https://gist.github.com/josiahcarlson/39ed816e80108093d585df...I wrote it in about an hour and a half. It seems to work in Python 3.6 and 3.12. Now you never need to write another double-underscore magic method again.
Take a deep breath.