◐ Shell
clean mode source ↗

Add `operator.call` by jopemachine · Pull Request #4153 · RustPython/RustPython

Expand Up @@ -10,7 +10,7 @@ This is the pure Python implementation of the module. """
__all__ = ['abs', 'add', 'and_', 'attrgetter', 'concat', 'contains', 'countOf', __all__ = ['abs', 'add', 'and_', 'attrgetter', 'call', 'concat', 'contains', 'countOf', 'delitem', 'eq', 'floordiv', 'ge', 'getitem', 'gt', 'iadd', 'iand', 'iconcat', 'ifloordiv', 'ilshift', 'imatmul', 'imod', 'imul', 'index', 'indexOf', 'inv', 'invert', 'ior', 'ipow', 'irshift', Expand Down Expand Up @@ -221,6 +221,12 @@ def length_hint(obj, default=0): raise ValueError(msg) return val
# Other Operations ************************************************************#
def call(obj, /, *args, **kwargs): """Same as obj(*args, **kwargs).""" return obj(*args, **kwargs)
# Generalized Lookup Objects **************************************************#
class attrgetter: Expand Down Expand Up @@ -423,6 +429,7 @@ def ixor(a, b): __abs__ = abs __add__ = add __and__ = and_ __call__ = call __floordiv__ = floordiv __index__ = index __inv__ = inv Expand Down