-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty dictionary returned in place of an error message #222
Comments
@carldlaird Here is the issue we discussed. |
I'm not certain Egret should throw an error here, despite what the docstring says. Prescient currently exploits this behavior to iterate over empty dictionaries when certain elements do not exist. For example, An aside: if you're running on current
|
@bknueven What if we adopted a similar interface to the dictionary "get" method where you can specify a default if it doesn't exist. Then the call would look something like the following to get the behavior you requested and throw an error otherwise? storage_elements = md.elements(element_type='storage', default=list()) thoughts? |
Since
|
Sample code:
That produces an empty dictionary instead of throwing an error when the
element_type
argument does not exist.The text was updated successfully, but these errors were encountered: