Strange tab completion oddity with enums?
Chris Angelico wrote:
>> Looks like everything starting with an underscore (except class, doc, and
>> module) is suppressed, probably to suppress some noise...
> That's why dir() shows what it does, but tab completion seems to have
> some other source, as it's able to find a lot of other attributes but
> not __annotations__. Very strange.
If I'm reading rlcompleter.py correctly
words = set(dir(thisobject))
if hasattr(thisobject, '__class__'):
ret = dir(klass)
for base in klass.__bases__:
ret = ret + get_class_members(base)
it implements its own way to walk the class tree, and type being the base
class of EnumMeta those additional attributes should be the result of