-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed as not planned
Closed as not planned
Copy link
Labels
pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
list
, tuple
, set
, frozenset
and dict
with or without *
work by indexing or slicing as shown below so these below are problematic so they should return error:
print(list[10]) # list[10]
print(tuple[10]) # tuple[10]
print(set[10]) # set[10]
print(frozenset[10]) # frozenset[10]
print(dict[10]) # dict[10]
print(*list[10]) # *list[10]
print(*tuple[10]) # *tuple[10]
print(*set[10]) # *set[10]
print(*frozenset[10]) # *frozenset[10]
print(*dict[10]) # *dict[10]
print(list[0:10:3]) # list[slice(0, 10, 3)]
print(tuple[0:10:3]) # tuple[slice(0, 10, 3)]
print(set[0:10:3]) # set[slice(0, 10, 3)]
print(frozenset[0:10:3]) # frozenset[slice(0, 10, 3)]
print(dict[0:10:3]) # dict[slice(0, 10, 3)]
print(*list[0:10:3]) # *list[slice(0, 10, 3)]
print(*tuple[0:10:3]) # *tuple[slice(0, 10, 3)]
print(*set[0:10:3]) # *set[slice(0, 10, 3)]
print(*frozenset[0:10:3]) # *frozenset[slice(0, 10, 3)]
print(*dict[0:10:3]) # *dict[slice(0, 10, 3)]
CPython versions tested on:
3.12
Operating systems tested on:
Windows
Metadata
Metadata
Assignees
Labels
pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error