Message11643

Author jeff.allen
Recipients jeff.allen, stefan.richthofer, zyasoft
Date 2017-11-02.23:12:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1509664338.15.0.213398074469.issue2638@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2017-11-02 23:12:18jeff.allensetmessageid: <1509664338.15.0.213398074469.issue2638@psf.upfronthosting.co.za>
2017-11-02 23:12:18jeff.allensetrecipients: + jeff.allen, zyasoft, stefan.richthofer
2017-11-02 23:12:18jeff.allenlinkissue2638 messages
2017-11-02 23:12:16jeff.allencreate