Message208356
| Author |
nascheme |
| Recipients |
eric.smith, nascheme, vstinner |
| Date |
2014年01月17日.19:33:05 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1389987186.49.0.722386532499.issue20284@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年01月17日 19:33:07 | nascheme | set | recipients:
+ nascheme, vstinner, eric.smith |
| 2014年01月17日 19:33:06 | nascheme | set | messageid: <1389987186.49.0.722386532499.issue20284@psf.upfronthosting.co.za> |
| 2014年01月17日 19:33:06 | nascheme | link | issue20284 messages |
| 2014年01月17日 19:33:06 | nascheme | create |
|