-
Type: Task
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
PyMongo does a lot of validation of inputs. Our error messages for validation need to do two things at once:
- Give python newbies the most obvious solution to their mistake, zen of python style.
- Not mislead seasoned developers about acceptable inputs.
For example, the new CRUD API methods validate the filter parameter to ensure that it inherits from collections.Mapping (or collections.MutableMapping for inserts). The existing error message says something like "filter must be a mapping type". This is likely confusing to naive users who don't know that a python "dict" is a mapping type.
Come up with better messages that attempt to achieve the two goals listed above.