Back to Intellij Community

PyTupleItemAssignmentInspection

python/python-psi-impl/resources/inspectionDescriptions/PyTupleItemAssignmentInspection.html

2025.3-rc-2166 B
Original Source

Reports assignments to a tuple item.

Example:

t = ('red', 'blue', 'green', 'white')
t[3] = 'black'

A quick-fix offers to replace the tuple with a list.