01.06.20 18:28, Raymond Hettinger пише:
On Jun 1, 2020, at 3:32 AM, [email protected] [email protected] <[email protected]>
wrote:
I propose that the `Set` ABC API should be augmented to contain all of the
named methods. This would provide consistency in the collections, and enhance
the duck typing capabilities of the `Set` abc.
Two thoughts. First, I believe Guido intentionally omitted the named set
methods from the ABC — perhaps the reasons are documented in the ABC PEP.
Second, most APIs are easily expanded by adding new methods, but ABCs define a
minimum for other classes to implement. So if we added new methods, it would
likely break code that was only meeting the existing minimum.
Concur with Raymond.
Also I want to add that ducktyping does not relay on ABCs. Actually they
are opposite approaches.
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/IMSWG4KQVVQAA6YY26IMRLZIOTYE5G4T/
Code of Conduct: http://python.org/psf/codeofconduct/