pg.typing.CallableWithOptionalKeywordArgs
Accessible via pg.typing.CallableWithOptionalKeywordArgs.
-
class CallableWithOptionalKeywordArgs(func, optional_keywords)[source]
Bases: object
Helper class for invoking callable objects with optional keyword args.
Examples:
f = pg.typing.CallableWithOptionalKeywordArgs(lambda x: x ** 2, 'y')
# Returns 4. Keyword 'y' is ignored.
f(2, y=3)