On 2018-10-30 08:12, Serhiy Storchaka wrote:
29.10.18 23:17, MRAB пише:
If you're pickling, then saying "pickle" is more helpful.
In English the usual long form is "cannot". Error messages tend to
avoid abbreviations, and also tend to have lowercase after the colon, e.g.:
"ZeroDivisionError: division by zero"
"ValueError: invalid literal for int() with base 10: 'foo'"
- If it's failing on an object (singular), then it's clearer to say
Articles tend to be omitted.
Error messages tend to have quotes around the type name.
Therefore, my preference is for:
"cannot pickle 'XXX' object"
Thank you Matthew, I'll use your variant.
Will something change the fact that in all these cases the pickling will be failed not just for specific object, but for all instances of the specified type?
Well, the other examples you gave did not say explicitly that all instances of that type would fail.
If you look at what 'hash' says:
Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unhashable type: 'list'
that would suggest "TypeError: unpicklable type: 'list'", but I'm not sure I'd like too much of "unpicklable", "unmarshallable", "unserializable", etc. :-)