Author nascheme
Recipients eric.smith, nascheme, vstinner
Date 2014-01-17.19:33:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Another revision of the patch, now quite close to PEP 461 as proposed.  Changes from PEP 461:

- include %a

- add -2 command-line flag.  When enabled have %s fallback to calling PyObject_Str() and encoding to ASCII and also enable %r as alias for %a.

Changes from previous patch:

- remove __ascii__ special method, %s will only accept objects that
  implement __bytes__ or the buffer API, unless -2 command line is used

- use buffer API if available

- add -2 command-line option

- Add prototypes for PyBytes_Format and _PyUnicode_FormatLong

- improve some exception messages

Reference counting in PyBytes_Format is quite hairy, could use some review.  The code is nearly the same as Python 2.x stringobject.c.
Date User Action Args
2014-01-17 19:33:07naschemesetrecipients: + nascheme, vstinner, eric.smith
2014-01-17 19:33:06naschemesetmessageid: <>
2014-01-17 19:33:06naschemelinkissue20284 messages
2014-01-17 19:33:06naschemecreate