Skip to content

type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not #64291

Open
@ethanfurman

Description

@ethanfurman
BPO 20092
Nosy @terryjreedy, @mdickinson, @benjaminp, @tpn, @bitdancer, @serhiy-storchaka, @MojoVampire
PRs
  • bpo-20092. Use __index__ in constructors of int, float and complex. #13108
  • bpo-20092: Make __int__ defaults to __index__ #13106
  • Files
  • test_index_not_int.py
  • 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 = None
    created_at = <Date 2013-12-28.19:56:32.757>
    labels = ['interpreter-core', 'type-feature', '3.8']
    title = 'type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not'
    updated_at = <Date 2021-11-19.13:14:29.675>
    user = 'https://github.com/ethanfurman'

    bugs.python.org fields:

    activity = <Date 2021-11-19.13:14:29.675>
    actor = 'patrick.yang.1248'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2013-12-28.19:56:32.757>
    creator = 'ethan.furman'
    dependencies = []
    files = ['35734']
    hgrepos = []
    issue_num = 20092
    keywords = ['patch']
    message_count = 21.0
    messages = ['207048', '207050', '207051', '207065', '207068', '207072', '207075', '207084', '207085', '207263', '221310', '221339', '221453', '221459', '221474', '221510', '313287', '341509', '344206', '344234', '406580']
    nosy_count = 10.0
    nosy_names = ['terry.reedy', 'mark.dickinson', 'benjamin.peterson', 'trent', 'Arfrever', 'r.david.murray', 'serhiy.storchaka', 'josh.r', 'amitava.b', 'patrick.yang.1248']
    pr_nums = ['13108', '13106']
    priority = 'low'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue20092'
    versions = ['Python 3.8']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.8 (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