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

PyIter_Next documentation inconsistent with implementation #49147

Closed
garcia mannequin opened this issue Jan 9, 2009 · 4 comments
Closed

PyIter_Next documentation inconsistent with implementation #49147

garcia mannequin opened this issue Jan 9, 2009 · 4 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@garcia
Copy link
Mannequin

garcia mannequin commented Jan 9, 2009

BPO 4897
Nosy @benjaminp
Superseder
  • bpo-3720: segfault in for loop with evil iterator
  • 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 2009-01-09.17:38:08.849>
    created_at = <Date 2009-01-09.14:52:15.287>
    labels = ['type-bug']
    title = 'PyIter_Next documentation inconsistent with implementation'
    updated_at = <Date 2009-01-09.19:00:57.581>
    user = 'https://bugs.python.org/garcia'

    bugs.python.org fields:

    activity = <Date 2009-01-09.19:00:57.581>
    actor = 'benjamin.peterson'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-01-09.17:38:08.849>
    closer = 'benjamin.peterson'
    components = ['None']
    creation = <Date 2009-01-09.14:52:15.287>
    creator = 'garcia'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 4897
    keywords = []
    message_count = 4.0
    messages = ['79472', '79481', '79488', '79489']
    nosy_count = 2.0
    nosy_names = ['benjamin.peterson', 'garcia']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '3720'
    type = 'behavior'
    url = 'https://bugs.python.org/issue4897'
    versions = ['Python 2.5']

    @garcia
    Copy link
    Mannequin Author

    garcia mannequin commented Jan 9, 2009

    The documentation for PyIter_Next says it will raise TypeError if the
    object passed to it is not an iterator. However, the implementation in
    abstract.c performs an assert rather than raising TypeError. I would
    prefer if the implementation were adjusted to match the documentation
    rather than vice-versa.

    @garcia garcia mannequin added the type-bug An unexpected behavior, bug, or error label Jan 9, 2009
    @benjaminp
    Copy link
    Contributor

    Closing a duplicate of bpo-3720.

    @garcia
    Copy link
    Mannequin Author

    garcia mannequin commented Jan 9, 2009

    Thanks for the quick response. I see that the discussion in 3720
    implicitly involves the implementation of PyIter_Next, but the
    documentation for PyIter_Next (and its conflict with the implementation)
    is not mentioned.

    @benjaminp
    Copy link
    Contributor

    The reason I linked to that issue is that the proposed patch brings the
    implementation inline with the documentation as you wished. :)

    @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
    type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant