Message11640

Author jeff.allen
Recipients jeff.allen, stefan.richthofer, zyasoft
Date 2017-11-01.19:54:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1509566084.15.0.213398074469.issue2638@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2017-11-01 19:54:44jeff.allensetmessageid: <1509566084.15.0.213398074469.issue2638@psf.upfronthosting.co.za>
2017-11-01 19:54:44jeff.allensetrecipients: + jeff.allen, zyasoft, stefan.richthofer
2017-11-01 19:54:43jeff.allenlinkissue2638 messages
2017-11-01 19:54:42jeff.allencreate