A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2001-January/012038.html below:

[Python-Dev] Keyword arg dictionary without keyword arguments

[Python-Dev] Keyword arg dictionary without keyword arguments [Python-Dev] Keyword arg dictionary without keyword argumentsJeremy Hylton jeremy@alum.mit.edu
Mon, 22 Jan 2001 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



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4