Re: Python (was Re: Recent history of vi)

Dan Sommers <[email protected]> Sat, 20 Dec 2025 12:15:06 -0500
Newsgroups gmane.comp.python.general
Message-ID <aUbZmkl5z9mwRlX3@spot>
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.  :-)