实用工具

Functions

flatten_tuple(x)

这包装了normalize_index。

is_functor(obj)

当且仅当定义了 obj.__call__ 时返回 true。