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

2018-10-30 Thread MRAB
On 2018-10-30 08:12, Serhiy Storchaka wrote: 29.10.18 23:17, MRAB пише: 1. If you're pickling, then saying "pickle" is more helpful. 2. 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.:    

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

2018-10-30 Thread Glenn Linderman
On 10/30/2018 1:12 AM, Serhiy Storchaka wrote: 29.10.18 23:17, MRAB пише: 1. If you're pickling, then saying "pickle" is more helpful. 2. 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.:

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

2018-10-30 Thread Victor Stinner
Le lun. 29 oct. 2018 à 22:20, MRAB a écrit : > 1. If you're pickling, then saying "pickle" is more helpful. I'm not sure that it's really possible to know if the error occurs while pickle is trying to serialize an object, or if it's a different serialization protocol. We are talking about the

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

2018-10-30 Thread Serhiy Storchaka
29.10.18 23:17, MRAB пише: 1. If you're pickling, then saying "pickle" is more helpful. 2. 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"    

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

2018-10-29 Thread MRAB
On 2018-10-29 22:21, Steven D'Aprano wrote: On Mon, Oct 29, 2018 at 08:51:34PM +0100, Victor Stinner wrote: Le lun. 29 oct. 2018 à 20:42, Serhiy Storchaka a écrit : > 1. "pickle" or "serialize"? serialize -1 Serializing is more general; pickle is merely one form of serializing:

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

2018-10-29 Thread Steven D'Aprano
On Mon, Oct 29, 2018 at 08:51:34PM +0100, Victor Stinner wrote: > Le lun. 29 oct. 2018 à 20:42, Serhiy Storchaka a écrit : > > 1. "pickle" or "serialize"? > > serialize -1 Serializing is more general; pickle is merely one form of serializing:

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

2018-10-29 Thread Steven D'Aprano
On Mon, Oct 29, 2018 at 09:17:12PM +, MRAB wrote: > Therefore, my preference is for: > > "cannot pickle 'XXX' object" +1 I completely concur with MRAB. -- Steve ___ Python-Dev mailing list Python-Dev@python.org

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

2018-10-29 Thread Terry Reedy
On 10/29/2018 5:17 PM, MRAB wrote: On 2018-10-29 19:38, Serhiy Storchaka wrote: 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)    

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

2018-10-29 Thread MRAB
On 2018-10-29 19:38, Serhiy Storchaka wrote: 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"

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

2018-10-29 Thread Glenn Linderman
On 10/29/2018 12:51 PM, Victor Stinner wrote: Le lun. 29 oct. 2018 à 20:42, Serhiy Storchaka a écrit : 1. "pickle" or "serialize"? serialize 2. "can't", "Cannot", "can not" or "cannot"? cannot 3. "object" or "objects"? object 4. Use the "a" article or not? no: "cannot serialize xxx

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

2018-10-29 Thread Barry Warsaw
On Oct 29, 2018, at 12:51, Victor Stinner wrote: > >> 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 :-)) It should be fine to leave off the indefinite article. > >> 5. Use quotes around type name or not?

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

2018-10-29 Thread Victor Stinner
Le lun. 29 oct. 2018 à 20:42, Serhiy Storchaka a écrit : > 1. "pickle" or "serialize"? serialize > 2. "can't", "Cannot", "can not" or "cannot"? cannot > 3. "object" or "objects"? object > 4. Use the "a" article or not? no: "cannot serialize xxx object" (but i'm not a native english

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

2018-10-29 Thread Serhiy Storchaka
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