Message208328
I'm attaching v2 of my proposed patch. This one is quite a bit better, IMHO.
- Introduce __ascii__ as a special method, like __str__ but required to exist only if an ASCII-only format exists.
- Extract PyString_Format from Python 2.7 and update it for PyBytes.
- %c only accepts integers, not single character strs, maybe should
accept length one byte objects.
- add %a, should be useful for debugging
- %s calls __bytes__ or __ascii__, otherwise gives a TypeError, should
eventually support buffer API
- number formats work as they do in Python 2. |
|
Date |
User |
Action |
Args |
2014-01-17 08:40:27 | nascheme | set | recipients:
+ nascheme, eric.smith |
2014-01-17 08:40:26 | nascheme | set | messageid: <1389948026.83.0.452131241252.issue20284@psf.upfronthosting.co.za> |
2014-01-17 08:40:26 | nascheme | link | issue20284 messages |
2014-01-17 08:40:26 | nascheme | create | |
|