Message11643
The special-casing hasn't been an obstacle for this issue. I just wondered if it stemmed from not having quite reproduced the CPython pattern. However, that may be a defect in my understanding. But if not finding __req__ determined the approach, it may be worth another look. __eq__ is its own reverse. You can see this at work here:
https://hg.python.org/jython/file/tip/src/org/python/core/PyObject.java#l1464
Also, when I worked recently on PyType I noticed for the first time the ExposeAsSuperclass marker interface. I wondered if that might be a way to have shadow strings that identify as str, without a new built-in type, but that act as you need them to.
https://hg.python.org/jython/file/tip/src/org/python/core/PyType.java#l373
On the present issue ... I got passing tests, then discovered that startswith and endswith are more complicated than I'd remembered. Mixed tuples produce some interesting cases (CPython 2.7.14):
>>> import sys; reload(sys).setdefaultencoding('utf-8')
>>> 'caf\xc3\xa9'.endswith(('zz',u'f\xe9'))
True |
|
Date |
User |
Action |
Args |
2017-11-02 23:12:18 | jeff.allen | set | messageid: <1509664338.15.0.213398074469.issue2638@psf.upfronthosting.co.za> |
2017-11-02 23:12:18 | jeff.allen | set | recipients:
+ jeff.allen, zyasoft, stefan.richthofer |
2017-11-02 23:12:18 | jeff.allen | link | issue2638 messages |
2017-11-02 23:12:16 | jeff.allen | create | |
|