Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitf3cb15c

Browse files
Rotzbuahauntsaninjaarhadthedev
authored
gh-91038: Change default argument value toFalse instead of0 (#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 parent8d0f09b commitf3cb15c

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-
defplatform(aliased=0,terse=0):
1249+
defplatform(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)

[8]ページ先頭

©2009-2025 Movatter.jp