[New-bugs-announce] [issue46882] Clarify argument type of platform.platform(aliased, terse) to boolean

Rotzbua report at bugs.python.org
Mon Feb 28 09:28:31 EST 2022


New submission from Rotzbua <bugs.python.org at kryx.de>:

Problem:
Both arguments `aliased` and `terse` should be boolean instead of integer.

Description:
The function is as `platform.platform(aliased=0, terse=0)` so both arguments `aliased` and `terse` seems to be numbers.
The documentation says: "If aliased is true,[..]" which gives a hint that the type should be boolean instead of an integer.
Looking into the implementation both arguments used as boolean.

Solution:
Update documentation and set default argument values to `False` instead of `0`.

Reference:
Current documentation: https://docs.python.org/3.11/library/platform.html#platform.platform

----------
assignee: docs at python
components: Documentation, Library (Lib)
messages: 414198
nosy: Rotzbua, docs at python
priority: normal
severity: normal
status: open
title: Clarify argument type of platform.platform(aliased, terse) to boolean
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9

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


More information about the New-bugs-announce mailing list