[Python-Dev] Standardize error message for non-pickleable types

Victor Stinner vstinner at redhat.com
Mon Oct 29 15:51:34 EDT 2018

Le lun. 29 oct. 2018 à 20:42, Serhiy Storchaka <storchaka at gmail.com> a écrit :
> 1. "pickle" or "serialize"?


> 2. "can't", "Cannot", "can not" or "cannot"?


> 3. "object" or "objects"?


> 4. Use the "a" article or not?

no: "cannot serialize xxx object" (but i'm not a native english
speaker, so don't trust me :-))

> 5. Use quotes around type name or not?

Use repr() in Python, but use '%s' is C since it would be too complex
to write code to properly implement repr() (decode tp_name from UTF-8,
handle error, call repr, handle error, etc.).

To use repr() on tp_name, I would prefer to have a new formatter, see
the thread of last month.


More information about the Python-Dev mailing list