joncle at googlemail.com
Sat Aug 28 14:57:25 CEST 2010
On Aug 28, 11:55 am, Steven D'Aprano <st... at REMOVE-THIS-
> On Sat, 28 Aug 2010 09:22:13 +0300, Jussi Piitulainen wrote:
> > Terry Reedy writes:
> >> On 8/27/2010 3:43 PM, Jussi Piitulainen wrote:
> >> > Dave Angel writes:
> Not everything needs to be a built-in method. There is already a standard
> way to spell "reverse a string":
> If you don't like that, you can do this:
I've had to debug code that assumed str(reversed('abc')) == 'cba'
'<reversed object at 0xa66f78c>'
So, a str doesn't "construct" like tuple/list...it's a call to
It's designated as a "friendly print out" (that's my phrasing).
['a', 'b', 'c']
I s'pose str is special (2.6) in some way, but it doesn't parallel the
[Not at Terry / Steve intended -- just most relevant post to respond
More information about the Python-list