mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-91038: Change default argument value to False
instead of 0
(#31621)
The argument is used as a switch and corresponds to a boolean logic. Therefore it is more intuitive to use the corresponding constant `False` as default value instead of the integer `0`. Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
This commit is contained in:
parent
8d0f09b1be
commit
f3cb15c88a
3 changed files with 3 additions and 2 deletions
|
@ -63,7 +63,7 @@ Cross Platform
|
||||||
string is returned if the value cannot be determined.
|
string is returned if the value cannot be determined.
|
||||||
|
|
||||||
|
|
||||||
.. function:: platform(aliased=0, terse=0)
|
.. function:: platform(aliased=False, terse=False)
|
||||||
|
|
||||||
Returns a single string identifying the underlying platform with as much useful
|
Returns a single string identifying the underlying platform with as much useful
|
||||||
information as possible.
|
information as possible.
|
||||||
|
|
|
@ -1246,7 +1246,7 @@ def python_compiler():
|
||||||
|
|
||||||
_platform_cache = {}
|
_platform_cache = {}
|
||||||
|
|
||||||
def platform(aliased=0, terse=0):
|
def platform(aliased=False, terse=False):
|
||||||
|
|
||||||
""" Returns a single string identifying the underlying platform
|
""" Returns a single string identifying the underlying platform
|
||||||
with as much useful information as possible (but no more :).
|
with as much useful information as possible (but no more :).
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
:meth:`platform.platform` now has boolean default arguments.
|
Loading…
Add table
Add a link
Reference in a new issue