-
Notifications
You must be signed in to change notification settings - Fork 0
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
KeyError when using SparseEnum sparsely with default() #4
Comments
Solution idea: Should https://github.com/TadLeonard/enumap/blob/master/enumap.py#L219 be - member_defaults = dict(_iter_member_defaults(members))
+ member_defaults = cls.map(**dict(_iter_member_defaults(members))) |
Thank you! I'll push out a |
Merged
Fixed by #5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using the
default()
feature introduced in version1.3.0
(via #1) renders breaksSparseEnumap
, omitted keys trigger aKeyError
:When not using
default()
, theSparseEnumap
behaves as expected and as before:The text was updated successfully, but these errors were encountered: