[issue46882] Clarify argument type of platform.platform(aliased, terse) to boolean
Rotzbua added the comment: Thanks for pointing out the logical change from "true" to "True". I do not want to start a discussion about principles. Nevertheless I think a change from `platform(aliased=0, terse=0)` to `platform(aliased=False, terse=False)` makes the how-to-use more intuitive. The change does not change any function behavior or breaks any backwards compatibilities. I created a new PR without the change of "true". -- ___ Python tracker <https://bugs.python.org/issue46882> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46882] Clarify argument type of platform.platform(aliased, terse) to boolean
Change by Rotzbua : -- pull_requests: +29745 pull_request: https://github.com/python/cpython/pull/31621 ___ Python tracker <https://bugs.python.org/issue46882> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46882] Clarify argument type of platform.platform(aliased, terse) to boolean
Change by Rotzbua : -- keywords: +patch pull_requests: +29742 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31617 ___ Python tracker <https://bugs.python.org/issue46882> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46882] Clarify argument type of platform.platform(aliased, terse) to boolean
New submission from Rotzbua : 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@python components: Documentation, Library (Lib) messages: 414198 nosy: Rotzbua, docs@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 <https://bugs.python.org/issue46882> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com