Skip to content

Commit 8ab27df

Browse files
committed
Touch-up to docstrings.
1 parent b278ac4 commit 8ab27df

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

Lib/platform.py

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
""" This module tries to retrieve as much platform identifying data as
3+
""" This module tries to retrieve as much platform-identifying data as
44
possible. It makes this information available via function APIs.
55
66
If called from the command line, it prints the platform
@@ -20,7 +20,7 @@
2020
# * support for Amiga and other still unsupported platforms running Python
2121
# * support for additional Linux distributions
2222
#
23-
# Many thanks to all those who helped adding platform specific
23+
# Many thanks to all those who helped adding platform-specific
2424
# checks (in no particular order):
2525
#
2626
# Charles G Waldman, David Arnold, Gordon McMillan, Ben Darnell,
@@ -118,15 +118,15 @@ def libc_ver(executable=sys.executable,lib='',version='',
118118

119119
chunksize=2048):
120120

121-
""" Tries to determine the libc version against which the
122-
file executable (defaults to the Python interpreter) is linked.
121+
""" Tries to determine the libc version that the file executable
122+
(which defaults to the Python interpreter) is linked against.
123123
124124
Returns a tuple of strings (lib,version) which default to the
125125
given parameters in case the lookup fails.
126126
127127
Note that the function has intimate knowledge of how different
128-
libc versions add symbols to the executable is probably only
129-
useable for executables compiled using gcc.
128+
libc versions add symbols to the executable and thus is probably
129+
only useable for executables compiled using gcc.
130130
131131
The file is read and scanned in chunks of chunksize bytes.
132132
@@ -219,13 +219,13 @@ def dist(distname='',version='',id='',
219219

220220
supported_dists=('SuSE','debian','redhat','mandrake')):
221221

222-
""" Tries to determine the name of the OS distribution name
222+
""" Tries to determine the name of the Linux OS distribution name.
223223
224224
The function first looks for a distribution release file in
225225
/etc and then reverts to _dist_try_harder() in case no
226226
suitable files are found.
227227
228-
Returns a tuple distname,version,id which default to the
228+
Returns a tuple (distname,version,id) which default to the
229229
args given as parameters.
230230
231231
"""
@@ -351,7 +351,7 @@ def popen(cmd, mode='r', bufsize=None):
351351

352352
def _norm_version(version,build=''):
353353

354-
""" Normalize the version and build strings and return a sinlge
354+
""" Normalize the version and build strings and return a single
355355
vesion string using the format major.minor.build (or patchlevel).
356356
"""
357357
l = string.split(version,'.')
@@ -544,8 +544,8 @@ def mac_ver(release='',versioninfo=('','',''),machine=''):
544544
versioninfo, machine) with versioninfo being a tuple (version,
545545
dev_stage, non_release_version).
546546
547-
Entries which cannot be determined are set to ''. All tuple
548-
entries are strings.
547+
Entries which cannot be determined are set to the paramter values
548+
which default to ''. All tuple entries are strings.
549549
550550
Thanks to Mark R. Levinson for mailing documentation links and
551551
code examples for this function. Documentation for the
@@ -595,7 +595,7 @@ def _java_getprop(name,default):
595595

596596
def java_ver(release='',vendor='',vminfo=('','',''),osinfo=('','','')):
597597

598-
""" Version interface for JPython.
598+
""" Version interface for Jython.
599599
600600
Returns a tuple (release,vendor,vminfo,osinfo) with vminfo being
601601
a tuple (vm_name,vm_release,vm_vendor) and osinfo being a
@@ -815,9 +815,9 @@ def _syscmd_file(target,default=''):
815815
def architecture(executable=sys.executable,bits='',linkage=''):
816816

817817
""" Queries the given executable (defaults to the Python interpreter
818-
binary) for various architecture informations.
818+
binary) for various architecture information.
819819
820-
Returns a tuple (bits,linkage) which contain information about
820+
Returns a tuple (bits,linkage) which contains information about
821821
the bit architecture and the linkage format used for the
822822
executable. Both values are returned as strings.
823823
@@ -828,9 +828,9 @@ def architecture(executable=sys.executable,bits='',linkage=''):
828828
829829
The function relies on the system's "file" command to do the
830830
actual work. This is available on most if not all Unix
831-
platforms. On some non-Unix platforms and then only if the
832-
executable points to the Python interpreter defaults from
833-
_default_architecture are used.
831+
platforms. On some non-Unix platforms where the "file" command
832+
does not exist and the executable is set to the Python interpreter
833+
binary defaults from _default_architecture are used.
834834
835835
"""
836836
# Use the sizeof(pointer) as default number of bits if nothing
@@ -905,7 +905,7 @@ def uname():
905905
identifying the underlying platform.
906906
907907
Note that unlike the os.uname function this also returns
908-
possible processor information as additional tuple entry.
908+
possible processor information as an additional tuple entry.
909909
910910
Entries which cannot be determined are set to ''.
911911
@@ -1013,7 +1013,8 @@ def system():
10131013

10141014
def node():
10151015

1016-
""" Returns the computer's network name (may not be fully qualified !)
1016+
""" Returns the computer's network name (which may not be fully
1017+
qualified)
10171018
10181019
An empty string is returned if the value cannot be determined.
10191020

0 commit comments

Comments
 (0)