Message2228
The recent discussion
http://www.geocrawler.com/lists/3/SourceForge/7017/0/80
83538/
made me believe that maybe string.replace() could be a
little more tolerant.
Add the following lines to string.py:
import sys
sys.add_package( "java.lang" )
from java.lang import String
and change the replace method as follows:
# Substring replacement (global)
def replace(s, old, new, maxsplit=-1):
"""<unchanged>"""
if isinstance( s, String ):
return s.intern().replace(old, new, maxsplit)
else:
return s.replace(old, new, maxsplit)
Best wishes,
Oti. |
|
| Date |
User |
Action |
Args |
| 2008-02-20 17:18:18 | admin | link | issue529629 messages |
| 2008-02-20 17:18:18 | admin | create | |
|