Improve signature of __getitem__ for list and dict
#96364
Labels
type-feature
A feature request or enhancement
__getitem__ for list and dict
#96364
sobolevn commentedAug 28, 2022
•
edited
Bug report
Right now both
listanddicthave incorrrect text signatures of__getitem__.What is affected?
In constrast with
__setitem__and__delitem__:It also affects
.__text_signature__:And
inspect.signature:I think that this can be fixed quite easily!
My plan is to modify these two descriptions:
cpython/Objects/listobject.c
Line 2827 in e860e52
cpython/Objects/dictobject.c
Line 3594 in e860e52
With something like
typeobject.chas:"__getitem__($self, key, /)\n--\n\nReturn self[key]."Using
clinichere seems impossible / overly-complex.Should I send a PR for this?🙂
The text was updated successfully, but these errors were encountered: