01.06.20 18:28, Raymond Hettinger пише:
On Jun 1, 2020, at 3:32 AM, a...@yert.pink a...@yert.pink <a...@yert.pink>
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 -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/IMSWG4KQVVQAA6YY26IMRLZIOTYE5G4T/
Code of Conduct: http://python.org/psf/codeofconduct/