On Thu, Aug 20, 2020 at 9:16 PM Random832 firstname.lastname@example.org wrote:
On Thu, Aug 20, 2020, at 20:09, Steven D'Aprano wrote:
This is likely to be a rare and unusual case, but we don't want to break anyone who already has a dunder something like this:
def __getitem__(self, index, extra=None)
People do similar things with regular arguments to regular functions now, trusting callers not to pass stuff in for no reason that will break the function has been adequate there.
Yes, but this is a little different in that the  operator will never pass in anything else, but if we make this change, then it might -- so this is a breaking change in this case. And having keywords in the square brackets pass keyword args to the dunder could,m in fact break this use case, whereas passing a new keyword_index object would not.
But as I said in an earlier note -- having ezra keyword parameters on __getitem__ is an abuse of the system anyway, so I think it's OK to break that.
Python-ideas mailing list -- email@example.com To unsubscribe send an email to firstname.lastname@example.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://email@example.com/message/XYYOGR... Code of Conduct: http://python.org/psf/codeofconduct/