PEP637 setter notation getitem -> setitem (#1640)

In PEP-0637, in the example discussing setter notation, change the example from `__getitem__` to `__setitem__`, as the former appears to be a mistake in this context.
This commit is contained in:
Gerrit Holl 2020-10-06 17:19:55 +02:00 committed by GitHub
parent a95341328c
commit fd1fbe7329
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -462,7 +462,7 @@ With the introduction of the new notation, a few corner cases need to be analyse
2. a similar case occurs with setter notation::
# Given type(obj).__getitem__(self, index, value):
# Given type(obj).__setitem__(self, index, value):
obj[1, value=3] = 5
This poses no issue because the value is passed automatically, and the python interpreter will raise