Skip to content

Commit 4d6aa92

Browse files
committed
Prettify re expression using re.VERBOSE.
1 parent 83add5d commit 4d6aa92

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

Lib/platform.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,13 @@ def libc_ver(executable=None, lib='', version='', chunksize=16384):
189189
# sys.executable is not set.
190190
return lib, version
191191

192-
libc_search = re.compile(
193-
br'(__libc_init)'
194-
br'|'
195-
br'(GLIBC_([0-9.]+))'
196-
br'|'
197-
br'(libc(_\w+)?\.so(?:\.(\d[0-9.]*))?)'
198-
br'|'
199-
br'(musl-([0-9.]+))'
200-
br'',
201-
re.ASCII)
192+
libc_search = re.compile(br"""
193+
(__libc_init)
194+
| (GLIBC_([0-9.]+))
195+
| (libc(_\w+)?\.so(?:\.(\d[0-9.]*))?)
196+
| (musl-([0-9.]+))
197+
""",
198+
re.ASCII | re.VERBOSE)
202199

203200
V = _comparable_version
204201
# We use os.path.realpath()

0 commit comments

Comments
 (0)