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:
parent
a95341328c
commit
fd1fbe7329
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue