[Python-checkins] CVS: python/dist/src/Lib string.py,1.46,1.47
Adrian Eyre
a.eyre at optichrome.com
Wed Feb 16 09:02:22 EST 2000
> >>> def Tim(i):
> ... return i ** i ** i
> ...
> >>> import string
> >>> string.join(['a',3,None,[Tim(1),Tim(2)]], ';')
> Traceback (innermost last):
> File "<stdin>", line 1, in ?
> TypeError: first argument must be sequence of strings
Well. That much was obvious. The issue was with which type should
have the join() method. I suspect, however, that JPython has this
already implemented, so this is unlikely to change in CPython.
Doesn't really bother me too much. It just feels like a kludge.
The rest of the methods seem reasonable. I'm assuming that the
translate() method accepts a 2^16 buffer for Unicode strings.
And the similarity of index() and find() makes me feel that one
should be redundant (probably the one which returns -1).
-----------------------------------------------------------------
Adrian Eyre <a.eyre at optichrome.com> - http://www.optichrome.com
More information about the Python-list
mailing list