Skip to content

Commit c4a05a8

Browse files
committed
-
1 parent 1fbb12e commit c4a05a8

File tree

1 file changed

+2
-2
lines changed
  • source_py3/python_toolbox/sequence_tools

1 file changed

+2
-2
lines changed

source_py3/python_toolbox/sequence_tools/misc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def partitions(sequence, partition_size=None, n_partitions=None,
9696
raise Exception('You must specify *either* `partition_size` *or* '
9797
'`n_paritions`.')
9898

99-
if fill_value != NO_FILL_VALUE and not allow_remainder:
99+
if fill_value is not NO_FILL_VALUE and not allow_remainder:
100100
raise ValueError('`fill_value` cannot be specified if '
101101
'`allow_remainder` is `False`.')
102102

@@ -119,7 +119,7 @@ def partitions(sequence, partition_size=None, n_partitions=None,
119119
blocks = [sequence[i : i + partition_size] for i in
120120
range(0, enlarged_length, partition_size)]
121121

122-
if fill_value != NO_FILL_VALUE and blocks:
122+
if fill_value is not NO_FILL_VALUE and blocks:
123123
filler = itertools.repeat(fill_value,
124124
enlarged_length - sequence_length)
125125
blocks[-1].extend(filler)

0 commit comments

Comments
 (0)