Skip to content

Should str.format allow negative indexes when used for __getitem__ access? #52199

@ericvsmith

Description

@ericvsmith
BPO 7951
Nosy @rhettinger, @terryjreedy, @mdickinson, @ericvsmith, @merwok, @florentx, @rovitotv, @marco-buttu, @ikamensh, @iritkatriel
Files
  • format_negative_indexes-2.7.diff: patch against trunk
  • format_negative_indexes-3.2.diff: patch against 3.2
  • format_no_fields_with_negative_indexes-2.7.diff: Don't allow negative fields
  • 7951NegativeIndexesForStringFormat3dot4.patch
  • 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/terryjreedy'
    closed_at = <Date 2021-12-01.01:47:31.771>
    created_at = <Date 2010-02-17.23:54:17.722>
    labels = ['easy', '3.11', 'type-feature', 'docs']
    title = 'Should str.format allow negative indexes when used for __getitem__ access?'
    updated_at = <Date 2021-12-01.01:47:31.769>
    user = 'https://github.com/ericvsmith'

    bugs.python.org fields:

    activity = <Date 2021-12-01.01:47:31.769>
    actor = 'eric.smith'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2021-12-01.01:47:31.771>
    closer = 'eric.smith'
    components = ['Documentation']
    creation = <Date 2010-02-17.23:54:17.722>
    creator = 'eric.smith'
    dependencies = []
    files = ['17712', '17713', '17768', '29948']
    hgrepos = []
    issue_num = 7951
    keywords = ['patch', 'easy']
    message_count = 33.0
    messages = ['99482', '99553', '107766', '107776', '107781', '107792', '107793', '107801', '107811', '107845', '108132', '108133', '108143', '108144', '108472', '108617', '113447', '113620', '113624', '115981', '116244', '187404', '190102', '215958', '216038', '225505', '266481', '340877', '340884', '347795', '407301', '407328', '407422']
    nosy_count = 14.0
    nosy_names = ['rhettinger', 'terry.reedy', 'mark.dickinson', 'eric.smith', 'kisielk', 'eric.araujo', 'mrabarnett', 'flox', 'docs@python', 'gosella', 'Todd.Rovito', 'marco.buttu', 'Ilya Kamenshchikov', 'iritkatriel']
    pr_nums = []
    priority = 'normal'
    resolution = 'wont fix'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue7951'
    versions = ['Python 3.11']

    Metadata

    Metadata

    Assignees

    Labels

    3.11only security fixesdocsDocumentation in the Doc direasytype-featureA feature request or enhancement
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions