Skip to content

Commit

Permalink
split_blocks: Shorten Python 2/3 compatible code.
Browse files Browse the repository at this point in the history
Shorten the import to one line and the assignment to one line. This
should keep things simple. Also should cutdown noise from linters and
coverage tools.
  • Loading branch information
jakirkham committed Dec 1, 2016
1 parent a584343 commit 10d9d08
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions kenjutsu/kenjutsu.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,9 @@ def split_blocks(space_shape, block_shape, block_halo=None):
xrange = range

try:
from itertools import ifilter
from itertools import imap
from itertools import ifilter, imap
except ImportError:
ifilter = filter
imap = map
ifilter, imap = filter, map

if block_halo is not None:
assert (len(space_shape) == len(block_shape) == len(block_halo)), \
Expand Down

0 comments on commit 10d9d08

Please sign in to comment.