# Add Optional Index Access Operator \`?\[\]\`

**URL:** <https://discuss.python.org/t/add-optional-index-access-operator/73221>\
**Category:** Ideas\
**Created:** [December 4, 2024, 3:15am UTC](https://discuss.python.org/t/add-optional-index-access-operator/73221 "2024-12-04T03:15:42Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![dg-pb](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/dg-pb/32/16248_2.png) [@dg-pb](https://discuss.python.org/u/dg-pb)\
**Post date:** [December 4, 2024, 4:47pm UTC](https://discuss.python.org/t/add-optional-index-access-operator/73221/10 "2024-12-04T16:47:04Z")

</div>

This is a bit old news. I think the resulting actions that came out of it were:

- [`itemgetter` split into 2 objects](https://discuss.python.org/t/itemgetter-split-into-2-objects/69020)  
and
- Link amended (was incorrect one): [Allowing missing item or attributes in operator's itemgetter and attrgetter](https://discuss.python.org/t/allowing-missing-item-or-attributes-in-operators-itemgetter-and-attrgetter/66256)

Utilities of these 2 will cover this. I.e. `getitem(..., default=) and itemgetter(..., default=)` and its iterator argument counterpart `gititeritem & itemitergetter`, which will allow for `default` iterable argument.

Anything more complex than that any time soon is unlikely. Be it `list.get` (which is quite hefty implementation with fair amount of issues with sequence protocol) or custom operators.

---

_[View the full topic](https://discuss.python.org/t/add-optional-index-access-operator/73221)._
