Paul Rubin wrote: > "gregarican" <[EMAIL PROTECTED]> writes: >> > reversed(a_string) (python) >> >> Which version of Python offers this function? It doesn't seem to be >> available in the 2.3 version I have installed... > > I think it's new in 2.4.
Needs a little help, though: >>> print reversed("abba") <reversed object at 0x4029454c> >>> class Str(str): ... def __reversed__(self): ... return self[::-1] ... >>> reversed(Str("abba")) 'abba' Now if only I had picked a better example :-) Peter -- http://mail.python.org/mailman/listinfo/python-list