Improve signature of __getitem__
for list
and dict
#96364
Labels
type-feature
A feature request or enhancement
__getitem__
for list
and dict
#96364
Bug report
Right now both
list
anddict
have 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.c
has:"__getitem__($self, key, /)\n--\n\nReturn self[key]."
Using
clinic
here seems impossible / overly-complex.Should I send a PR for this? 🙂
The text was updated successfully, but these errors were encountered: