You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 2, 2019. It is now read-only.
The common thing to do if you override __getattr__ is to also override __dir__ like so:
def__dir__(self):
# you may also want to filter the keys to only include the stringsreturnsorted(set(super(AttrDict, self).__dir__()) +set(self.keys()))
This would make it much easier to use attrdict in IPython and other IDEs as you would gain auto-completion.
The text was updated successfully, but these errors were encountered:
The common thing to do if you override
__getattr__
is to also override__dir__
like so:This would make it much easier to use attrdict in IPython and other IDEs as you would gain auto-completion.
The text was updated successfully, but these errors were encountered: