Visitar URL original
bpo-40890: Add `mapping` property to dict views by sweeneyde · Pull Request #20749 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20251121080351/https://github.com/python/cpython/pull/20749
Skip to content

Conversation

@sweeneyde
Copy link
Member

@sweeneyde sweeneyde commented Jun 9, 2020 •

@methane
Copy link
Member

methane commented Jun 12, 2020

Would you write a What's new entry too?

@rhettinger rhettinger merged commit 3ee0e48 into python:master Jun 12, 2020
}

static PyObject *
dictview_mapping(PyObject *view)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should have signature compatible with getter:

static PyObject *
dictview_mapping(PyObject *view, void *Py_UNUSED(ignored))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #20876

}

static PyGetSetDef dictview_getset[] = {
{"mapping", (getter)dictview_mapping, (setter)NULL,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explicit cast to getter is not needed if fix the signature.

jab added a commit to jab/cpython that referenced this pull request Oct 11, 2021
@sweeneyde sweeneyde deleted the dictview_mapping_descriptor branch January 25, 2022 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants