ipython / ipython/ipython

Tab completion is missing the built-in class attributes `__bases__` and `__name__`

Open
#14,243 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
16.8k
Forks
4.5k
Avg merge
1d 2h
Merged PRs (30d)
6

Description

It appears that tab completion is missing the built-in class attributes `__bases__` and `__name__` (except for built-in Python classes).

```python
In [1]: class MyDict(dict):
...: pass
...:
```

Hit tab before writing `MyDict.__bases__` fully out, and it does not complete.

Or hit tab after writing only `MyDict.__n`, and it shows:
```python
In [2]: MyDict.__ne
__ne__() __new__()
```
because it doesn't think there is any attribute that starts with `__na`.

The other built-in class attributes – `__dict__`, `__doc__`, and `__module__` – show up correctly in tab completion.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.