Raymond Hettinger added the comment: FWIW, I've long considered this to be a feature of set and dicts, it is the only way a user can affect sparseness. For lookup only sets, the extra sparseness is a virtue (fewer collisions). So, I would like to leave the current code in-place.
With sets the goals are different from dicts. I place less value on compactness and more value on fast membership testing. And with dicts, the norm is that the looked-up key usually exists. With sets, the goal isn't looking an element known to be in the set, but more about determining whether an element is in the set. Accordingly, sets have to optimize for misses as well as hits. In the future, please assign set feature requests to me so that I don't miss them. ---------- assignee: -> rhettinger resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29961> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com