Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
ISTM that this would encourage silently inefficient coding patterns like: url.endswith({'.html', '.txt', '.php'}) # The set object gets rebuilt on every call # and a new set iterator object gets built on every call. # Looping over the contents uses the slower iterator protocol # rather than the existing superfast PyTuple_GET_SIZE() and # PyTuple_GET_ITEM() macros which are entirely in-lined. Do we have any known use cases or user requests where the existing API doesn't suffice? ---------- nosy: +rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34312> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com