[Python-Dev] Keyword arg dictionary without keyword arguments

Guido van Rossum guido@digicool.com
Mon, 22 Jan 2001 21:01:12 -0500

>   [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.

Yes, that's a good idea.  I hope that the {} in alpha 1 won't make
folks think that they will never see a NULL in the future and code

--Guido van Rossum (home page: http://www.python.org/~guido/)