On Mon, Oct 25, 2021 at 07:17:18PM +0300, Serhiy Storchaka wrote: > 25.10.21 18:49, Kazantcev Andrey пише: > > Now if do something like `[] in set()` python raise an exception, > > but if an object isn't hashable then we know for sure that it isn't > > in the set. Propose return False for these cases. What do you think?
I'm surprised that wasn't already the case. Serhiy wrote: > What was changed since this topic was discussed last time? We're eight years older and wiser perhaps? https://mail.python.org/archives/list/[email protected]/thread/UOPPG7UM4PZILHEPZBVKQQXGPKHTJQUJ/#57R3HRZYGL2MVPJTEWUICM5OXT3M7GXZ It seems to me that there are good arguments to be made for both behaviours, but none are strong enough to break backwards compatibility. -- Steve _______________________________________________ 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/Y2ETOU2NWNACI53KJXY4WMYSXMHYTLN3/ Code of Conduct: http://python.org/psf/codeofconduct/
