]> granicus.if.org Git - python/commit
dict.get() and dict.setdefault() now use AC
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 19 Jan 2017 11:37:13 +0000 (12:37 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 19 Jan 2017 11:37:13 +0000 (12:37 +0100)
commit7dc6a5f50aa47d32a75941dcb091eabe7958b2a1
treec909658d7f5e9dc17bac36ef8552132b0cdd81de
parent06d34393c2f1f28bf97873418e2b981e7b188811
dict.get() and dict.setdefault() now use AC

Issue #29311: dict.get() and dict.setdefault() methods now use Argument Clinic
to parse arguments. Their calling convention changes from METH_VARARGS to
METH_FASTCALL which avoids the creation of a temporary tuple.

The signature of docstrings is also enhanced. For example,
    get(...)
becomes:
    get(self, key, default=None, /)
Objects/clinic/dictobject.c.h
Objects/dictobject.c