Skip to content

Commit

Permalink
A few lines were indented using spaces instead of tabs -- fix them.
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum committed Mar 26, 1998
1 parent fa6e254 commit 8ca8420
Show file tree
Hide file tree
Showing 12 changed files with 282 additions and 265 deletions.
14 changes: 7 additions & 7 deletions Lib/binhex.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ def getfileinfo(name):
fp = open(name)
data = open(name).read(256)
for c in data:
if not c in string.whitespace \
and (c<' ' or ord(c) > 0177):
break
if not c in string.whitespace \
and (c<' ' or ord(c) > 0177):
break
else:
finfo.Type = 'TEXT'
fp.seek(0, 2)
Expand Down Expand Up @@ -214,10 +214,10 @@ def _write(self, data):
self.ofp.write(data)

def _writecrc(self):
# XXXX Should this be here??
# self.crc = binascii.crc_hqx('\0\0', self.crc)
self.ofp.write(struct.pack('>h', self.crc))
self.crc = 0
# XXXX Should this be here??
# self.crc = binascii.crc_hqx('\0\0', self.crc)
self.ofp.write(struct.pack('>h', self.crc))
self.crc = 0

def write(self, data):
if self.state != _DID_HEADER:
Expand Down
4 changes: 2 additions & 2 deletions Lib/bisect.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
def insort(a, x, lo=0, hi=None):
if hi is None:
hi = len(a)
while lo < hi:
while lo < hi:
mid = (lo+hi)/2
if x < a[mid]: hi = mid
else: lo = mid+1
Expand All @@ -18,7 +18,7 @@ def insort(a, x, lo=0, hi=None):
def bisect(a, x, lo=0, hi=None):
if hi is None:
hi = len(a)
while lo < hi:
while lo < hi:
mid = (lo+hi)/2
if x < a[mid]: hi = mid
else: lo = mid+1
Expand Down
28 changes: 14 additions & 14 deletions Lib/copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,20 +198,20 @@ def _deepcopy_dict(x, memo):
d[types.DictionaryType] = _deepcopy_dict

def _keep_alive(x, memo):
"""Keeps a reference to the object x in the memo.
Because we remember objects by their id, we have
to assure that possibly temporary objects are kept
alive by referencing them.
We store a reference at the id of the memo, which should
normally not be used unless someone tries to deepcopy
the memo itself...
"""
try:
memo[id(memo)].append(x)
except KeyError:
# aha, this is the first one :-)
memo[id(memo)]=[x]
"""Keeps a reference to the object x in the memo.
Because we remember objects by their id, we have
to assure that possibly temporary objects are kept
alive by referencing them.
We store a reference at the id of the memo, which should
normally not be used unless someone tries to deepcopy
the memo itself...
"""
try:
memo[id(memo)].append(x)
except KeyError:
# aha, this is the first one :-)
memo[id(memo)]=[x]

def _deepcopy_inst(x, memo):
if hasattr(x, '__deepcopy__'):
Expand Down
Loading

0 comments on commit 8ca8420

Please sign in to comment.