Closed as not planned
Description
Bug report
Bug description:
Using a del statement only with a tuple indexed gets the error message with doesn't
instead of does not
as shown below:
v = ('a', 'b', 'c')
v[1] = 'A'
# TypeError: 'tuple' object does not support item assignment
v[1:3] = ['A', 'B']
# TypeError: 'tuple' object does not support item assignment
del v[1]
# TypeError: 'tuple' object doesn't support item deletion
# ↑↑↑↑↑↑↑
del v[1:3]
# TypeError: 'tuple' object does not support item deletion
And, using a del
statement only with a string indexed gets the error message with doesn't
instead of does not
as shown below:
v = 'abc'
v[1] = 'A'
# TypeError: 'str' object does not support item assignment
v[1:3] = ['A', 'B']
# TypeError: 'str' object does not support item assignment
del v[1]
# TypeError: 'str' object doesn't support item deletion
# ↑↑↑↑↑↑↑
del v[1:3]
# TypeError: 'str' object does not support item deletion
CPython versions tested on:
3.13
Operating systems tested on:
Windows