Metadata-Version: 2.1
Name: CalcTool
Version: 0.1.0
Summary: A package for tools in Python
Author: Zhu Chongjing
Author-email: tommy1008@dingtalk.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown

# 导入 Import

```python
from CalcTool import *
```

***发现任何bug或问题，请反馈到tommy1008@dingtalk.com，谢谢！**

***If you find any bugs or issues, please report them to tommy1008@dingtalk.com, thank you!** 

# 排序工具 SortTool

```python
def sort(arr: List[Any], key: Callable[[Any], Any] = lambda x: x, reverse: bool = False) -> None:
```

**示例代码**：使用内置的`abs`函数作为`key`，即以绝对值大小排序。

**Example code**: Use the built-in `abs` function as the `key` to sort by absolute value.

```python
>>> numbers = [-5, 3, -2, 1, 4]
>>> sort(numbers, key=abs)
>>> print(numbers)
[1, -2, 3, 4, -5] 
```

**内省排序`Introsort`，结合了多种排序算法的优点，以确保在各种情况下都能获得高效的性能，不返回列表。** `arr`，待排序的列表。`key`，用于比较的键函数，自定义排序规则，而不必修改原始数据。`reverse`，是否降序排列，默认为升序。

**Introsort, which combines the advantages of multiple sorting algorithms to ensure efficient performance in all cases.** Does not return a list. `arr` is the list to be sorted. `key` is a function to extract a comparison key from each element, allowing custom sorting without modifying the original data. `reverse` specifies whether to sort in descending order (default is ascending).
