Message368537
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. |
|
Date |
User |
Action |
Args |
2020-05-09 19:23:30 | jaraco | set | recipients:
+ jaraco, lemburg |
2020-05-09 19:23:30 | jaraco | set | messageid: <1589052210.4.0.40101790694.issue40578@roundup.psfhosted.org> |
2020-05-09 19:23:30 | jaraco | link | issue40578 messages |
2020-05-09 19:23:30 | jaraco | create | |
|