[issue40570] len(platform.uname()) has changed in Python 3.9

David Tucker report at bugs.python.org
Fri May 8 16:02:20 EDT 2020


New submission from David Tucker <david.tucker at dell.com>:

https://github.com/python/cpython/commit/518835f3354d6672e61c9f52348c1e4a2533ea00#diff-47c8e5750258a08a6dd9de3e9c3774acL741-R804

That diff changed len(platform.uname()) to 5 (from 6).

I noticed because we have some code that checks for 6 strs (arguably unnecessary),
but I can also think of contrived examples that would break (e.g. platform.uname()[-3]).
Interestingly, platform.uname()[5] still works.

Was this effect intentional?

----------
components: Library (Lib)
messages: 368459
nosy: tucked
priority: normal
severity: normal
status: open
title: len(platform.uname()) has changed in Python 3.9
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40570>
_______________________________________


More information about the Python-bugs-list mailing list