I've many times been saved from bugs by an early crash because of this inconsistency. So it's not at all clear to me why this would be a good thing.
> On 13 Oct 2019, at 15:22, Steve Jorgensen <ste...@stevej.name> wrote: > > Currently, it is not possible to use a single method name to add an item to > a collection that might be a set or a list. > > There have been other requests for a "push" method to be a complement to > "pop", so if that were added to both set and list (synonym for <set>.add and > <list>.append) that would solve the issue. > > Additionally, there have been other requests for an operator for adding to a > collection, and in some other languages such as C++ and Ruby, "<<" is used > for the same or similar purposes. Perhaps both "push" and "__lshift__" could > be added as synonymous operations. > _______________________________________________ > 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/4UJXITCREFUHTV23BP2Z235TGBY743GA/ > Code of Conduct: http://python.org/psf/codeofconduct/ _______________________________________________ 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/C7INFY52TJWZEJ6IJHSSD7KXCQZRYF5A/ Code of Conduct: http://python.org/psf/codeofconduct/