Julien Palard <julien+pyt...@palard.fr> added the comment:
In the other end that's true that's an iterable, and that's what's count. So if we want to change the implementation in the future, we still can, as long as we still return an iterable, it won't break asumptions. So I'll keep the "iterable" word in the documentation, and it looks OK to me that the docstring tells more about the implementation than the interface, so I'll leave it as is too. Relying on what you read in the current implementation is relying on an implementation detail that may change in the future, this weakens your code, please just consider it's an iterable? Anyway the key set of the WeakKeyDictionary can change at any time, according to the actions you're doing while iterating over the keys, so better write solid code here, and be prepred for the worse, don't rely on implementation details. ---------- nosy: +mdk _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35007> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com