Skip to content

Commit f3cb15c

Browse files
Rotzbuahauntsaninjaarhadthedev
authored
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>
1 parent 8d0f09b commit f3cb15c

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Doc/library/platform.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Cross Platform
6363
string is returned if the value cannot be determined.
6464

6565

66-
.. function:: platform(aliased=0, terse=0)
66+
.. function:: platform(aliased=False, terse=False)
6767

6868
Returns a single string identifying the underlying platform with as much useful
6969
information as possible.

Lib/platform.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,7 @@ def python_compiler():
12461246

12471247
_platform_cache = {}
12481248

1249-
def platform(aliased=0, terse=0):
1249+
def platform(aliased=False, terse=False):
12501250

12511251
""" Returns a single string identifying the underlying platform
12521252
with as much useful information as possible (but no more :).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
:meth:`platform.platform` now has boolean default arguments.

0 commit comments

Comments
 (0)