[Python-Dev] Keyword arg dictionary without keyword arguments

Jeremy Hylton jeremy@alum.mit.edu
2001年1月22日 20:54:53 -0500 (EST)


>>>>> "GvR" == Guido van Rossum <guido@digicool.com> writes:

 [Jeremy wrote:]
 >> Does your query ("Do you really need the NULL?") mean that you
 >> don't care whether the argument is NULL or an empty dictionary?
 >> I could change the code to do either for 2.1a2, if you have a
 >> preference.
 GvR> Robust code IMO should treat NULL and {} the same. But since
 GvR> traditionally we passed NULL, it's better to pass NULL rather
 GvR> than {}. I believe that's the status quo now, right?
The current status in CVS is to pass {}, because there appeared to be
some case where a PyCFunction was not expecting NULL. I assumed,
without checking, that {} was required and change the implementation
to always pass a dictionary to METH_KEYWORDS functions. I could
change it back to NULL and see if I can reproduce the error I was
seeing.
Jeremy

AltStyle によって変換されたページ (->オリジナル) /