diff options
Diffstat (limited to 'Lib/operator.py')
-rw-r--r-- | Lib/operator.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/operator.py b/Lib/operator.py index 241fdbb..72105be 100644 --- a/Lib/operator.py +++ b/Lib/operator.py @@ -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: @@ -423,6 +429,7 @@ __not__ = not_ __abs__ = abs __add__ = add __and__ = and_ +__call__ = call __floordiv__ = floordiv __index__ = index __inv__ = inv |