Antoine Pitrou added the comment: > Dict has a special case for string keys. Is set have such optimization? Yes (see set_lookkey_unicode). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19187> _______________________________________