mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Whitespace normalization.
This commit is contained in:
parent
c0c12b5707
commit
2c60f7a136
11 changed files with 98 additions and 98 deletions
|
@ -499,12 +499,12 @@ def strptime(data_string, format="%a %b %d %H:%M:%S %Y"):
|
|||
#populous then just inline calculations. Also might be able to use
|
||||
#``datetime`` and the methods it provides.
|
||||
if julian == -1:
|
||||
julian = julianday(year, month, day)
|
||||
julian = julianday(year, month, day)
|
||||
else: # Assuming that if they bothered to include Julian day it will
|
||||
#be accurate
|
||||
year, month, day = gregorian(julian, year)
|
||||
year, month, day = gregorian(julian, year)
|
||||
if weekday == -1:
|
||||
weekday = dayofweek(year, month, day)
|
||||
weekday = dayofweek(year, month, day)
|
||||
return time.struct_time((year, month, day,
|
||||
hour, minute, second,
|
||||
weekday, julian, tz))
|
||||
|
|
|
@ -85,10 +85,10 @@ def dirname(s): return split(s)[0]
|
|||
def basename(s): return split(s)[1]
|
||||
|
||||
def ismount(s):
|
||||
if not isabs(s):
|
||||
return False
|
||||
components = split(s)
|
||||
return len(components) == 2 and components[1] == ''
|
||||
if not isabs(s):
|
||||
return False
|
||||
components = split(s)
|
||||
return len(components) == 2 and components[1] == ''
|
||||
|
||||
def isdir(s):
|
||||
"""Return true if the pathname refers to an existing directory."""
|
||||
|
|
|
@ -415,9 +415,9 @@ else:
|
|||
environ = _Environ(environ)
|
||||
|
||||
def getenv(key, default=None):
|
||||
"""Get an environment variable, return None if it doesn't exist.
|
||||
The optional second argument can specify an alternate default."""
|
||||
return environ.get(key, default)
|
||||
"""Get an environment variable, return None if it doesn't exist.
|
||||
The optional second argument can specify an alternate default."""
|
||||
return environ.get(key, default)
|
||||
__all__.append("getenv")
|
||||
|
||||
def _exists(name):
|
||||
|
|
|
@ -1859,10 +1859,10 @@ def dis(pickle, out=None, indentlevel=4):
|
|||
|
||||
markmsg = None
|
||||
if markstack and markobject in opcode.stack_before:
|
||||
assert markobject not in opcode.stack_after
|
||||
markpos = markstack.pop()
|
||||
if markpos is not None:
|
||||
markmsg = "(MARK at %d)" % markpos
|
||||
assert markobject not in opcode.stack_after
|
||||
markpos = markstack.pop()
|
||||
if markpos is not None:
|
||||
markmsg = "(MARK at %d)" % markpos
|
||||
|
||||
if arg is not None or markmsg:
|
||||
# make a mild effort to align arguments
|
||||
|
|
|
@ -92,8 +92,8 @@ def slave_open(tty_name):
|
|||
except ImportError:
|
||||
return result
|
||||
try:
|
||||
ioctl(result, I_PUSH, "ptem")
|
||||
ioctl(result, I_PUSH, "ldterm")
|
||||
ioctl(result, I_PUSH, "ptem")
|
||||
ioctl(result, I_PUSH, "ldterm")
|
||||
except IOError:
|
||||
pass
|
||||
return result
|
||||
|
|
|
@ -1249,7 +1249,7 @@ class TarFile(object):
|
|||
if self.posix:
|
||||
prefix = tarinfo.name[:LENGTH_PREFIX + 1]
|
||||
while prefix and prefix[-1] != "/":
|
||||
prefix = prefix[:-1]
|
||||
prefix = prefix[:-1]
|
||||
|
||||
name = tarinfo.name[len(prefix):]
|
||||
prefix = prefix[:-1]
|
||||
|
|
26
setup.py
26
setup.py
|
@ -347,9 +347,9 @@ class PyBuildExt(build_ext):
|
|||
exts.append( Extension('fcntl', ['fcntlmodule.c']) )
|
||||
if platform not in ['mac']:
|
||||
# pwd(3)
|
||||
exts.append( Extension('pwd', ['pwdmodule.c']) )
|
||||
# grp(3)
|
||||
exts.append( Extension('grp', ['grpmodule.c']) )
|
||||
exts.append( Extension('pwd', ['pwdmodule.c']) )
|
||||
# grp(3)
|
||||
exts.append( Extension('grp', ['grpmodule.c']) )
|
||||
# select(2); not on ancient System V
|
||||
exts.append( Extension('select', ['selectmodule.c']) )
|
||||
|
||||
|
@ -380,8 +380,8 @@ class PyBuildExt(build_ext):
|
|||
# enigma-inspired encryption
|
||||
exts.append( Extension('rotor', ['rotormodule.c']) )
|
||||
if platform not in ['mac']:
|
||||
# syslog daemon interface
|
||||
exts.append( Extension('syslog', ['syslogmodule.c']) )
|
||||
# syslog daemon interface
|
||||
exts.append( Extension('syslog', ['syslogmodule.c']) )
|
||||
|
||||
# George Neville-Neil's timing module:
|
||||
exts.append( Extension('timing', ['timingmodule.c']) )
|
||||
|
@ -420,11 +420,11 @@ class PyBuildExt(build_ext):
|
|||
if platform not in ['mac']:
|
||||
# crypt module.
|
||||
|
||||
if self.compiler.find_library_file(lib_dirs, 'crypt'):
|
||||
libs = ['crypt']
|
||||
else:
|
||||
libs = []
|
||||
exts.append( Extension('crypt', ['cryptmodule.c'], libraries=libs) )
|
||||
if self.compiler.find_library_file(lib_dirs, 'crypt'):
|
||||
libs = ['crypt']
|
||||
else:
|
||||
libs = []
|
||||
exts.append( Extension('crypt', ['cryptmodule.c'], libraries=libs) )
|
||||
|
||||
# socket(2)
|
||||
exts.append( Extension('_socket', ['socketmodule.c'],
|
||||
|
@ -602,7 +602,7 @@ class PyBuildExt(build_ext):
|
|||
# Steen Lumholt's termios module
|
||||
exts.append( Extension('termios', ['termios.c']) )
|
||||
# Jeremy Hylton's rlimit interface
|
||||
if platform not in ['atheos']:
|
||||
if platform not in ['atheos']:
|
||||
exts.append( Extension('resource', ['resource.c']) )
|
||||
|
||||
# Sun yellow pages. Some systems have the functions in libc.
|
||||
|
@ -863,7 +863,7 @@ class PyBuildExt(build_ext):
|
|||
for F in framework_dirs:
|
||||
# both Tcl.framework and Tk.framework should be present
|
||||
for fw in 'Tcl', 'Tk':
|
||||
if not exists(join(F, fw + '.framework')):
|
||||
if not exists(join(F, fw + '.framework')):
|
||||
break
|
||||
else:
|
||||
# ok, F is now directory with both frameworks. Continure
|
||||
|
@ -910,7 +910,7 @@ class PyBuildExt(build_ext):
|
|||
platform = self.get_platform()
|
||||
if platform == 'darwin' and \
|
||||
self.detect_tkinter_darwin(inc_dirs, lib_dirs):
|
||||
return
|
||||
return
|
||||
|
||||
# Set platform specific library prefix, if any
|
||||
if platform == 'cygwin':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue