Message11640
Many unicode methods like find(s), endswith(s) and split(s) should accept a str argument and apply the default decoding. I've created (surprisingly many) failing tests about this that pass for CPython. Because coercion is centralised, most of them are fixed by changes in just a couple of places.
I'm a bit puzzled by the code around concatenation and comparison in PyObject, PyString and PyUnicode. We seem not to have defined __add__ and __radd__ after the CPython pattern, and the delegation (using PyType.isSubType) is not the same in PyObject._add as in PyObject._eq, for example.
Just for extra fun, there's the special-casing of PyShadowString which I thought should work automatically. Maybe it would if the foundation had been like CPython? |
|
Date |
User |
Action |
Args |
2017-11-01 19:54:44 | jeff.allen | set | messageid: <1509566084.15.0.213398074469.issue2638@psf.upfronthosting.co.za> |
2017-11-01 19:54:44 | jeff.allen | set | recipients:
+ jeff.allen, zyasoft, stefan.richthofer |
2017-11-01 19:54:43 | jeff.allen | link | issue2638 messages |
2017-11-01 19:54:42 | jeff.allen | create | |
|