knify 1.8.58__tar.gz → 1.8.60__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {knify-1.8.58 → knify-1.8.60}/PKG-INFO +1 -1
- {knify-1.8.58 → knify-1.8.60}/knify/help.py +1 -1
- {knify-1.8.58 → knify-1.8.60}/knify/listutil.py +3 -2
- {knify-1.8.58 → knify-1.8.60}/knify.egg-info/PKG-INFO +1 -1
- {knify-1.8.58 → knify-1.8.60}/LICENSE +0 -0
- {knify-1.8.58 → knify-1.8.60}/README.md +0 -0
- {knify-1.8.58 → knify-1.8.60}/knify/__init__.py +0 -0
- {knify-1.8.58 → knify-1.8.60}/knify/dateutil.py +0 -0
- {knify-1.8.58 → knify-1.8.60}/knify/excelutil.py +0 -0
- {knify-1.8.58 → knify-1.8.60}/knify/fileutil.py +0 -0
- {knify-1.8.58 → knify-1.8.60}/knify/logger.py +0 -0
- {knify-1.8.58 → knify-1.8.60}/knify/objutil.py +0 -0
- {knify-1.8.58 → knify-1.8.60}/knify/threadutil.py +0 -0
- {knify-1.8.58 → knify-1.8.60}/knify/warnutil.py +0 -0
- {knify-1.8.58 → knify-1.8.60}/knify.egg-info/SOURCES.txt +0 -0
- {knify-1.8.58 → knify-1.8.60}/knify.egg-info/dependency_links.txt +0 -0
- {knify-1.8.58 → knify-1.8.60}/knify.egg-info/requires.txt +0 -0
- {knify-1.8.58 → knify-1.8.60}/knify.egg-info/top_level.txt +0 -0
- {knify-1.8.58 → knify-1.8.60}/setup.cfg +0 -0
- {knify-1.8.58 → knify-1.8.60}/setup.py +0 -0
@@ -9,10 +9,11 @@ def partition(list_obj: list, partition_size: int) -> list[object]:
|
|
9
9
|
return [list_obj[i:i + partition_size] for i in range(0, len(list_obj), partition_size)]
|
10
10
|
|
11
11
|
|
12
|
-
def groupby(list_obj: list,
|
12
|
+
def groupby(list_obj: list, key_func: Callable[[object], object],
|
13
|
+
value_func: Callable[[object], object] = lambda v_: v_) -> dict[object, list[object]]:
|
13
14
|
grouped = defaultdict(list)
|
14
15
|
for obj in list_obj:
|
15
|
-
grouped[
|
16
|
+
grouped[key_func(obj)].append(value_func(obj))
|
16
17
|
return grouped
|
17
18
|
|
18
19
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|