4

Are there any cases where

f(arg1, arg2..., argN)

works and produces a result and

f(arg1, arg2..., argN, **{} )

yields a different result, or causes an error?

I'm assuming that a **kwds doesn't already occur in the argument list.

The context is that I'm writing a functor that holds a function and it's arguments for later evaluation, and want to support optional keywords.

Sven Marnach
  • 574,206
  • 118
  • 941
  • 841
Dave
  • 7,555
  • 8
  • 46
  • 88

1 Answers1

3

Yes, this is always safe to do. The two calls are completely equivalent, and the function f() has no way to distinguish them (except for introspecting the source code, of course).

Sven Marnach
  • 574,206
  • 118
  • 941
  • 841