Skip to content

Commit 3daf82b

Browse files
committed
-
1 parent 6c0848b commit 3daf82b

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

source_py3/python_toolbox/logic_tools.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,16 @@ def all_equal(iterable, exhaustive=False):
2323
# todo: Maybe I should simply check if `len(set(iterable)) == 1`? Will not
2424
# work for unhashables.
2525

26-
2726
if exhaustive is True:
2827
items = tuple(iterable)
2928
if len(items) <= 1:
3029
return True
3130
from python_toolbox import combi
3231
pairs = tuple(
33-
tuple(items[i] for i in comb) for comb in
34-
combi.CombSpace(len(items), 2)
32+
items * comb for comb in combi.CombSpace(len(items), 2)
3533
)
36-
# Must do it like that because items might not be hashable.
34+
# Can't feed the items directly to `CombSpace` because they might not
35+
# be hashable.
3736
else: # exhaustive is False
3837
pairs = cute_iter_tools.iterate_overlapping_subsequences(iterable)
3938

source_py3/python_toolbox/re_tools.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Copyright 2009-2015 Ram Rachum.
22
# This program is distributed under the MIT license.
33

4-
'''Defines miscellaneous tools.'''
5-
64
import re
75

86

source_py3/python_toolbox/reasoned_bool.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
# Copyright 2009-2015 Ram Rachum.
22
# This program is distributed under the MIT license.
33

4-
'''
5-
Defines the `ReasonedBool` class.
6-
7-
See its documentation for more details.
8-
'''
9-
104

115
class ReasonedBool:
126
'''

0 commit comments

Comments
 (0)