Skip to content

int() and math.trunc don't accept objects that only define __index__ #77220

@ncoghlan

Description

@ncoghlan
BPO 33039
Nosy @mdickinson, @ncoghlan, @serhiy-storchaka, @appeltel, @csabella, @remilapeyre, @tirkarthi
PRs
  • bpo-20092: Make __int__ defaults to __index__ #13106
  • Superseder
  • bpo-20092: type() constructor should bind int to index when index is defined and int is not
  • 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 2019-05-06.14:29:29.151>
    created_at = <Date 2018-03-10.08:57:10.957>
    labels = ['3.8', 'type-feature', '3.7', 'docs']
    title = "int() and math.trunc don't accept objects that only define __index__"
    updated_at = <Date 2019-05-06.14:29:29.150>
    user = 'https://github.com/ncoghlan'

    bugs.python.org fields:

    activity = <Date 2019-05-06.14:29:29.150>
    actor = 'serhiy.storchaka'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2019-05-06.14:29:29.151>
    closer = 'serhiy.storchaka'
    components = ['Documentation']
    creation = <Date 2018-03-10.08:57:10.957>
    creator = 'ncoghlan'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 33039
    keywords = ['patch']
    message_count = 10.0
    messages = ['313515', '313522', '332819', '333546', '336044', '336201', '336234', '340453', '341505', '341508']
    nosy_count = 8.0
    nosy_names = ['mark.dickinson', 'ncoghlan', 'docs@python', 'serhiy.storchaka', 'Eric Appelt', 'cheryl.sabella', 'remi.lapeyre', 'xtreak']
    pr_nums = ['13106']
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '20092'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue33039'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of life3.8 (EOL)end of lifedocsDocumentation in the Doc dirtype-featureA feature request or enhancement

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions