Jason R. Coombs <jar...@jaraco.com> added the comment:
Thanks David for the report and the draft PR (which helped me validate my thinking on the matter). In PR 20015, I've included additional tests. I've also re-written the compatibility functions to rely on the main `__iter__` override. Another situation that's likely to be incompatible is pickleability. Is that important? I'm tempted to make deprecated the use of `uname_result` for anything other than attribute access (maybe with the ability to cast to a tuple, i.e. `tuple(res)`). The problem with namedtuples is that although they provide backward-compatibility for legacy behavior which returned tuples, they also bring that legacy as debt. By deprecating "access by index", that would constrain the interface to two basic usages: attribute access and `iter()` of all values. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40570> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com