函式編程模組¶
The modules described in this chapter provide functions and classes that support a functional programming style, and general operations on callables.
本章包含下列的模組:
itertools--- 建立產生高效率迴圈之疊代器的函式functools--- Higher-order functions and operations on callable objectsoperator--- 標準運算子替代函式lt()le()eq()ne()ge()gt()__lt__()__le__()__eq__()__ne__()__ge__()__gt__()not_()__not__()truth()is_()is_not()abs()__abs__()add()__add__()and_()__and__()floordiv()__floordiv__()index()__index__()inv()invert()__inv__()__invert__()lshift()__lshift__()mod()__mod__()mul()__mul__()matmul()__matmul__()neg()__neg__()or_()__or__()pos()__pos__()pow()__pow__()rshift()__rshift__()sub()__sub__()truediv()__truediv__()xor()__xor__()concat()__concat__()contains()__contains__()countOf()delitem()__delitem__()getitem()__getitem__()indexOf()setitem()__setitem__()length_hint()call()__call__()attrgetter()itemgetter()methodcaller()- 運算子與函式間的對映
- 原地 (in-place) 運算子