When you try to to pickle or copy a non-pickleable object, you will get an error. In most cases this will be a TypeError with one of few similar, but different variants:

  "can't pickle XXX objects" (default)
  "Cannot serialize XXX object" (socket, BZ2Compressor, BZ2Decompressor)
  "can not serialize a 'XXX' object" (buffered files in _pyio)
"cannot serialize 'XXX' object" (FileIO, TextWrapperIO, WinConsoleIO, buffered files in _io, LZMACompressor, LZMADecompressor)
  "cannot serialize {} object" (proposed for SSLContext)

Perhaps some of them where added without deep thinking and then were replicated in different places. I'm going to replace all of them with a standardized error message. But I'm unsure what variant is better.

1. "pickle" or "serialize"?

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

3. "object" or "objects"?

4. Use the "a" article or not?

5. Use quotes around type name or not?

Please help me to choose the best variant.

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to