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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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 :).
Lines changed: 1 addition & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy