Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

The feature was first implemented in Lib/sets.py (arising from PEP 218) in pure 
python. It was found to be useful and carried forward to the C implementation 
for the built-in type.  The feature is documented but not highlighted in the 
Library Reference, "Both set and frozenset support set to set comparisons."

You are correct that feature became less performant when the swap-bodies code 
was eliminated; however, the feature still has value so that a user can write 
"s in t" rather than "frozenset(s) in t".

Thank you for the suggestion, but I'm going to elect to leave the code as-is. 
There's no reason break other people's code and remove a feature that is 
intentional, guaranteed, tested, and sometimes useful in applications that have 
sets of frozensets.

If you don't like the feature, it is okay to not use it ;-)

----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34719>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to