mirror of
https://github.com/python/cpython.git
synced 2025-07-22 18:55:22 +00:00
Replace list of constants with tuples of constants.
This commit is contained in:
parent
07ead17318
commit
dbecd93b72
11 changed files with 29 additions and 29 deletions
|
@ -182,7 +182,7 @@ class _posixfile_:
|
|||
'freebsd6', 'bsdos2', 'bsdos3', 'bsdos4'):
|
||||
flock = struct.pack('lxxxxlxxxxlhh', \
|
||||
l_start, l_len, os.getpid(), l_type, l_whence)
|
||||
elif sys.platform in ['aix3', 'aix4']:
|
||||
elif sys.platform in ('aix3', 'aix4'):
|
||||
flock = struct.pack('hhlllii', \
|
||||
l_type, l_whence, l_start, l_len, 0, 0, 0)
|
||||
else:
|
||||
|
@ -198,7 +198,7 @@ class _posixfile_:
|
|||
'bsdos2', 'bsdos3', 'bsdos4'):
|
||||
l_start, l_len, l_pid, l_type, l_whence = \
|
||||
struct.unpack('lxxxxlxxxxlhh', flock)
|
||||
elif sys.platform in ['aix3', 'aix4']:
|
||||
elif sys.platform in ('aix3', 'aix4'):
|
||||
l_type, l_whence, l_start, l_len, l_sysid, l_pid, l_vfs = \
|
||||
struct.unpack('hhlllii', flock)
|
||||
elif sys.platform == "linux2":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue