Issue2394

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

Created on 2015-09-10.22:07:18 by jeff.allen, last changed 2018-03-22.07:32:47 by jeff.allen.

Messages
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.
History
Date User Action Args
2018-03-22 07:32:47jeff.allensetpriority: low
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