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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: knify
3
- Version: 1.8.58
3
+ Version: 1.8.60
4
4
  Summary: Development tools for python
5
5
  Home-page: https://github.com/qicongsheng/knify
6
6
  Author: qicongsheng
@@ -8,7 +8,7 @@ def get_pip_name():
8
8
 
9
9
 
10
10
  def get_version():
11
- return '1.8.58'
11
+ return '1.8.60'
12
12
 
13
13
 
14
14
  def print_version():
@@ -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, key: Callable[[object], object], value: Callable[[object], object] = lambda v_: v_):
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[key(obj)].append(value(obj))
16
+ grouped[key_func(obj)].append(value_func(obj))
16
17
  return grouped
17
18
 
18
19
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: knify
3
- Version: 1.8.58
3
+ Version: 1.8.60
4
4
  Summary: Development tools for python
5
5
  Home-page: https://github.com/qicongsheng/knify
6
6
  Author: qicongsheng
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