Skip to content
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

Make struct mode access errors consistent with Python #138

Closed
omry opened this issue Jan 28, 2020 · 1 comment
Closed

Make struct mode access errors consistent with Python #138

omry opened this issue Jan 28, 2020 · 1 comment

Comments

@omry
Copy link
Owner

omry commented Jan 28, 2020

When struct mode is enabled, DictConfig behaves like a normal dictionary and also like a real object.

Make sure exceptions thrown are consistent with Python:

  1. foo["not_found"] should raise key error
  2. foo.not_found should raise attribute error.

Note that while not in struct node, both of those return None instead of raising an error.

@omry
Copy link
Owner Author

omry commented Jan 29, 2020

done

@omry omry closed this as completed Jan 29, 2020
@omry omry added this to the OmegaConf 2.0.0 milestone Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant