Oops, look like I took this off-list by accident -- bringing it back on.
On Fri, Aug 28, 2020 at 12:50 PM Guido van Rossum email@example.com wrote:
IMO the bar for attempting to solve this is pretty high, since I can think of no way to solve it without breaking old code that doesn't involve introducing new names.
Exactly -- so we're kind of stuck with the existing ABCs for a good long while. Maybe that's OK, but it does mean we are choosing to freeze at least this part of Python.
But I agree with you that it's problematic to add features to the builtins as well (like .get() to list and friends that aren't in the ABCs, so we're really freezing a lot of the language.
Which may be a good thing, but on this list at least, I expect people wont like that :-)
FWIW I don't think there's an exception for dunders -- if we were to add
Sequence.__new_dunder__ we'd still break code due to register().
hmm -- I never actually used register(), and had always assumed that it did some checking -- but apparently not, so yes, anything registered with an ABC that something was added to could now be broken thanks for the tip.
Though that's probably less breakage, but breakage all the same.