-
Notifications
You must be signed in to change notification settings - Fork 1.5k
handling indexerror for ConfigParser.get #4971
Copy link
Copy link
Closed
Description
I noticed that if we had a dictionary:
config = {
'key1':
[{'key2_1': 1}, {'key2_2': 2}]
}config.get('key1#2') will throw an error instead of returning a None because it only catches KeyError. I would like to suggest including IndexError so that we can have a unified interface. Thanks
Originally posted by @mingxin-zheng in #4765 (comment)
the current implementation can only handle keyerror
MONAI/monai/bundle/config_parser.py
Line 176 in f5520f3
| except KeyError: |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels