Skip to content

Commit

Permalink
Fix: Simplify 32-bit workaround.
Browse files Browse the repository at this point in the history
  • Loading branch information
bjones1 committed Jun 6, 2016
1 parent 3de588a commit 261ad7a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/functional/scripts/pyi_future.py
Expand Up @@ -15,7 +15,6 @@

from builtins import (bytes, str, open, super, range,
zip, round, input, int, pow, object)
import platform

# Backported Py3 bytes object
b = bytes(b'ABCD')
Expand Down Expand Up @@ -76,11 +75,11 @@ def append(self, item):
# scaled_indices = (self._step * n for n in slce.indices(self._len))
# OverflowError: cannot fit 'long' into an index-sized integer
#
# So, avoid this on 32-bit platforms; see https://docs.python.org/2.7/library/platform.html#platform.architecture.
if platform.architecture()[0] != '32bit':
# New iterable range object with slicing support
for i in range(10**15)[:10]:
pass
# So, pick a smaller (32-bit capable) range to iterate over.
#
# New iterable range object with slicing support
for i in range(2**30)[:10]:
pass

# Other iterators: map, zip, filter
my_iter = zip(range(3), ['a', 'b', 'c'])
Expand Down

0 comments on commit 261ad7a

Please sign in to comment.