On Mon, 30 Nov 2026 20:47:38 +0100, Bonita Montero wrote:
> Am 30.11.2026 um 19:49 schrieb Lawrence D’Oliveiro:
>
>> On Mon, 30 Nov 2026 19:44:50 +0100, Bonita Montero wrote:
>
>>> It's for sure more flexible since it can handle more variations of
>>> compatible types and it's for sure much fasger.
>
>> You betcha:
>>
>> >>> max("red", "green", "blue")
>> 'red'
>> >>> max(["red"], ["red", "green"], ["blue"])
>> ['red', 'green']
>>
>> Anything that has an ordering defined will work.
>
> In C++ you can write your own conversion to supply compatible types.
Python does custom operator overloads, too. And multiple inheritance.
And its core definition still ends up being only a small fraction of
the size of C++.
And unlike C++, and almost like Algol 68, it can do things that look
like custom operators, too
<https://gitlab.com/ldo/python_topics_notebooks/-/blob/master/Defining%20(Almost)%20Custom%20Operators.ipynb>.