Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Change default argument value to False instead of 0
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`.
  • Loading branch information
Rotzbua committed Feb 28, 2022
commit 513d84d621eee9ca41f867004cf308fed6bea873
2 changes: 1 addition & 1 deletion Doc/library/platform.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Cross Platform
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
information as possible.
Expand Down
2 changes: 1 addition & 1 deletion Lib/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ def python_compiler():

_platform_cache = {}

def platform(aliased=0, terse=0):
def platform(aliased=False, terse=False):

""" Returns a single string identifying the underlying platform
with as much useful information as possible (but no more :).
Expand Down