Title: str has misplaced methods isdecimal and isumeric
Type: behaviour Severity: normal
Components: Versions: Jython 2.7
Status: open Resolution: accepted
Dependencies: Superseder:
Assigned To: jeff.allen Nosy List: jeff.allen, zyasoft
Priority: Keywords:

Created on 2015-09-10.22:07:18 by jeff.allen, last changed 2018-03-14.20:11:16 by jeff.allen.

msg10248 (view) Author: Jeff Allen (jeff.allen) Date: 2015-09-10.22:07:18
I noticed when working on #2364 that PyString exposes methods that belong to PyUnicode. Previous to that fix there was delegation from PyUnicode to these methods for the basic plane case. It was probably always wrong to have exposed them.

>>> [s for s in dir(str) if s.startswith('is')]
['isalnum', 'isalpha', 'isdecimal', 'isdigit', 'islower', 'isnumeric', 'isspace', 'istitle', 'isunicode', 'isupper']

They are in the public Java API of PyString, so I'm reluctant just to delete them without discussion.
msg10264 (view) Author: Jim Baker (zyasoft) Date: 2015-09-17.20:35:18
I think it is safe to delete these methods from PyString, even for a subsequent release in the 2.7.x series. Perhaps a future version of Jython would have annotations that mark what belongs to the true public Java API of Jython vs what is necessary to support the Python runtime.
Date User Action Args
2018-03-14 20:11:16jeff.allensetassignee: jeff.allen
resolution: accepted
2015-09-17 20:35:19zyasoftsetnosy: + zyasoft
messages: + msg10264
2015-09-10 22:07:18jeff.allencreate