Skip to content

Avoid raising OverflowError in len() when __len__() returns negative large value #74025

Closed
@serhiy-storchaka

Description

@serhiy-storchaka
BPO 29839
Nosy @warsaw, @terryjreedy, @vstinner, @serhiy-storchaka, @orenmn
PRs
  • bpo-29839: Raise ValueError rather than OverflowError in len() for negative values. #701
  • 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 = 'https://github.com/serhiy-storchaka'
    closed_at = <Date 2017-04-16.07:05:36.437>
    created_at = <Date 2017-03-17.19:52:14.485>
    labels = ['interpreter-core', 'type-feature', '3.7']
    title = 'Avoid raising OverflowError in len() when __len__() returns negative large value'
    updated_at = <Date 2017-04-16.07:05:36.434>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2017-04-16.07:05:36.434>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2017-04-16.07:05:36.437>
    closer = 'serhiy.storchaka'
    components = ['Interpreter Core']
    creation = <Date 2017-03-17.19:52:14.485>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 29839
    keywords = []
    message_count = 5.0
    messages = ['289779', '289782', '290109', '291740', '291742']
    nosy_count = 5.0
    nosy_names = ['barry', 'terry.reedy', 'vstinner', 'serhiy.storchaka', 'Oren Milman']
    pr_nums = ['701']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue29839'
    versions = ['Python 3.7']

    Metadata

    Metadata

    Labels

    3.7 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions