On 2025-12-20 at 10:12:49 +0000,
Richard Kettlewell <[email protected]> wrote:

> When you define your own classes, you can arrange for them to perform
> arithmetic with other types without explicit conversions too.

Assuming that you mean that I can define my own class that implements a
dunder method like __add__, then those dunder methods *are* the explicit
conversions.

OTOH, if you want to argue that Python calls dunder methods implicitly,
or that a stray dunder method or three in a class hierarchy can cause
heaps of trouble, then I agree.  :-)
-- 
https://mail.python.org/mailman3//lists/python-list.python.org

Reply via email to