Jason R. Coombs <jar...@jaraco.com> added the comment:

In issue40570, Marc-Andre writes:

> I don't think that deprecating standard tuple access is an option
for the uname() return value, since it's documented to be a tuple.

My thinking here is that as part of the deprecation, the documentation would be 
updated to reflect the recommended and long-term supported usage (attribute 
access + iterability), including the recommended way to adapt if one wants a 
tuple. The guidance would eliminate or indicate as deprecated the index-based 
access. Then, by way of the DeprecationWarning, those still relying on 
item-access would be encouraged to update their implementation to use the 
preferred form. 


By doing this, `platform` goes from having 3 right ways to do something:

```
system = platform.system()
system = platfurm.uname().system
system = platform.uname()[0]
```

to just the first two.

I don't see how documenting something makes it permanent, though I acknowledge 
it does affect how one approaches any deprecation.

----------

_______________________________________
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

Reply via email to