Skip to content

Unexpected outcome while accessing the value of a dictionary #127834

@amitesh-the-coder

Description

@amitesh-the-coder

Bug report

Bug description:

d = {(1, 2, 3): 'ab'} #Initializing a  dictionary
d[(1,2,3)]
>>>'ab' #output of d[(1,2,3)] as expected
d[1,2,3]
>>>'ab' #expected error while executing d[1,2,3] but got the output 'ab'

Screenshot 2024-12-11 222713

CPython versions tested on:

3.13

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions