Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f3cb15c

Browse filesBrowse 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
Copy full SHA for f3cb15c

File tree

3 files changed

+3
-2
lines changed
Filter options

3 files changed

+3
-2
lines changed

‎Doc/library/platform.rst

Copy file name to clipboardExpand all lines: Doc/library/platform.rst
+1-1Lines 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

Copy file name to clipboardExpand all lines: Lib/platform.py
+1-1Lines 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 :).
+1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.