FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-46882: Clarify argument type of platform.platform(aliased, terse) to boolean by Rotzbua · Pull Request #31617 · python/cpython · GitHub

/ cpython Public
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) .rst  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
6 changes: 3 additions & 3 deletions Doc/library/platform.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@ 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.

The output is intended to be *human readable* rather than machine parseable. It
may look different on different platforms and this is intended.

If *aliased* is true, the function will use aliases for various platforms that
If *aliased* is ``True``, the function will use aliases for various platforms that
report system names which differ from their common names, for example SunOS will
be reported as Solaris. The :func:`system_alias` function is used to implement
this.

Setting *terse* to true causes the function to return only the absolute minimum
Setting *terse* to ``True`` causes the function to return only the absolute minimum
information needed to identify the platform.

.. versionchanged:: 3.8
Expand Down
6 changes: 3 additions & 3 deletions Lib/platform.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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 All @@ -1185,13 +1185,13 @@ def platform(aliased=0, terse=0):
machine parseable. It may look different on different
platforms and this is intended.

If "aliased" is true, the function will use aliases for
If "aliased" is True, the function will use aliases for
various platforms that report system names which differ from
their common names, e.g. SunOS will be reported as
Solaris. The system_alias() function is used to implement
this.

Setting terse to true causes the function to return only the
Setting terse to True causes the function to return only the
absolute minimum information needed to identify the platform.

"""
Expand Down

Back | FazBrowse Home | New Git URL