New GitHub issue #118937 from nineteendo:<br>
<hr>
<pre>
# Feature or enhancement
### Proposal:
\>30.3k files use this syntax: [`a[()]`](https://github.com/search?q=%2F%5Cw%2B%5C%5B%5C%28%5C%29%5C%5D%2F+language%3APython&type=code). Could we allow specifying a default for `__getitem__()` & `__class_getitem__()`:
```python
class Tuple(tuple):
def __class_getitem__(cls, item=(), /):
return super().__class_getitem__(item)
```
The current SyntaxError for `a[]` isn't very helpful either:
```python
>>> tuple[()]
tuple[()]
>>> tuple[]
File "<python-input-1>", line 1
tuple[]
^
SyntaxError: invalid syntax
```
We already don't need parentheses in other cases: `tuple[int]`, `tuple[int, int]`.
### Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
### Links to previous discussion of this feature:
_No response_
</pre>
<hr>
<a href="https://github.com/python/cpython/issues/118937">View on GitHub</a>
<p>Labels: type-feature</p>
<p>Assignee: </p>