Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for PyDict_Update is incorrect #62656

Closed
ncoghlan opened this issue Jul 15, 2013 · 4 comments
Closed

Documentation for PyDict_Update is incorrect #62656

ncoghlan opened this issue Jul 15, 2013 · 4 comments
Labels
docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@ncoghlan
Copy link
Contributor

BPO 18456
Nosy @rhettinger, @ncoghlan, @ezio-melotti
Files
  • PyDict_Update.patch: Updated PyDict_Update doc
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2014-03-25.08:35:13.268>
    created_at = <Date 2013-07-15.02:11:12.491>
    labels = ['type-feature', 'docs']
    title = 'Documentation for PyDict_Update is incorrect'
    updated_at = <Date 2014-03-25.08:35:35.850>
    user = 'https://github.com/ncoghlan'

    bugs.python.org fields:

    activity = <Date 2014-03-25.08:35:35.850>
    actor = 'python-dev'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2014-03-25.08:35:13.268>
    closer = 'python-dev'
    components = ['Documentation']
    creation = <Date 2013-07-15.02:11:12.491>
    creator = 'ncoghlan'
    dependencies = []
    files = ['34610']
    hgrepos = []
    issue_num = 18456
    keywords = ['patch']
    message_count = 4.0
    messages = ['193070', '213116', '214788', '214789']
    nosy_count = 6.0
    nosy_names = ['rhettinger', 'ncoghlan', 'ezio.melotti', 'docs@python', 'python-dev', 'Jill.M']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue18456'
    versions = ['Python 2.7', 'Python 3.3', 'Python 3.4']

    @ncoghlan
    Copy link
    Contributor Author

    The docs from PyDict_Update (http://docs.python.org/3/c-api/dict.html#PyDict_Update) claim it is equivalent to the Python level dict.update (http://docs.python.org/3/library/stdtypes#dict.update)

    This isn't accurate - unlike dict.update, PyDict_Update doesn't fall back to the iterating over a sequence of key value pairs if the second argument has no "keys" attribute.

    @ncoghlan ncoghlan added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Jul 15, 2013
    @rhettinger
    Copy link
    Contributor

    Nice catch.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 25, 2014

    New changeset 8e1637e3a099 by Georg Brandl in branch '3.4':
    Closes bpo-18456: Doc fix: PyDict_Update only works with dict-like objects, not key-value sequences. Patch by priyapappachan.
    http://hg.python.org/cpython/rev/8e1637e3a099

    @python-dev python-dev mannequin closed this as completed Mar 25, 2014
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 25, 2014

    New changeset 2e51845a99e2 by Georg Brandl in branch '2.7':
    Closes bpo-18456: Doc fix: PyDict_Update only works with dict-like objects, not key-value sequences. Patch by priyapappachan.
    http://hg.python.org/cpython/rev/2e51845a99e2

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants