- Errors during type casting (calls to
.map_casted
and.tuple_casted
) will now be re-raised to the user as aTypeCastError
that contains clearer information about which key/field was given an uncastable value - Fixed a bug (issue #5) where sparse declarative defaults resulted in
KeyErrors
. Basically,SparseEnumap
must always have a complete dictionary of defaults. The goal ofSparseEnumap
is that you can get collections out of your data specs no matter what's missing.SparseEnumap.set_defaults
works this way, so sparse usage ofdefault()
in the declarative style should work too.
Many thank to @jonemo for finding bugs, suggesting fixes, and suggesting the sparse declarative default feature.