Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac-Flath committed Oct 2, 2024
1 parent c43811c commit 1577f26
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion fastcore/basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,6 @@ def nested_attr(o, attr, default=None):
for a in attr.split("."):
if hasattr(o, a): o = getattr(o, a)
elif hasattr(o, '__getitem__'): o = o[a]
else: return default
except (AttributeError, KeyError): return default
return o

Expand Down
1 change: 0 additions & 1 deletion nbs/01_basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3916,7 +3916,6 @@
" for a in attr.split(\".\"):\n",
" if hasattr(o, a): o = getattr(o, a)\n",
" elif hasattr(o, '__getitem__'): o = o[a]\n",
" else: return default\n",
" except (AttributeError, KeyError): return default\n",
" return o"
]
Expand Down

0 comments on commit 1577f26

Please sign in to comment.