New submission from Jason R. Coombs <jar...@jaraco.com>:
In issue40570, I learned that some users are still relying on legacy tuple-like behaviors of `platform.uname()`, namely the access by item position and length: ``` platform.uname()[0] len(platform.uname()) ``` I propose to deprecate these behaviors and constrain the supported interface to the following: ``` platform.uname().attribute items = tuple(platform.uname()) ``` In other words, the `uname_result` would only support access of the items by attribute or iteration of all attributes. Any users wishing to access items by position or to calculate the length of the result would need to explicitly construct a tuple from the result. ---------- messages: 368517 nosy: jaraco, lemburg priority: normal severity: normal status: open title: Deprecate numeric item access for platform.uname() type: enhancement _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40578> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com