Re: Python Love :)

2006-03-13 Thread http://phr.cx
"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. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Love :)

2006-03-13 Thread Paddy
BWill wrote: > and ixnay on the ubyray or else I'll tell you where to stick your > endblock delimiter :P Umm, Did you mean to write the above? What has it to do with Ruby? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Love :)

2006-03-13 Thread gregarican
Paul Rubin wrote: > Darn, yes, that's the second time in the past couple weeks I've made > that exact same error in a clpy post. So what's the most concise way > of turning it back into a string? ''.join(list(reversed(a_string))) ? > Bleccch. Use Ruby: print "A String".reverse Just kidding :

Re: Python Love :)

2006-03-13 Thread Kent Johnson
Paul Rubin wrote: > So what's the most concise way > of turning it back into a string? ''.join(list(reversed(a_string))) ? You don't need the list(), join() can take an iterator: ''.join(reversed(a_string)) Kent -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Love :)

2006-03-13 Thread Paul Rubin
Peter Otten <[EMAIL PROTECTED]> writes: > >>> print reversed("abba") > Darn, yes, that's the second time in the past couple weeks I've made that exact same error in a clpy post. So what's the most concise way of turning it back into a string? ''.join(list(reversed(a_string))) ? Bleccch. -- htt

Re: Python Love :)

2006-03-13 Thread Peter Otten
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 re

Re: Python Love :)

2006-03-13 Thread Paul Rubin
"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. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Love :)

2006-03-13 Thread gregarican
Paul Rubin wrote: > 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... -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Love :)

2006-03-13 Thread Paul Rubin
rtilley <[EMAIL PROTECTED]> writes: > a_string.reverse (ruby) > a_string[::-1](python) reversed(a_string) (python) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Love :)

2006-03-13 Thread rtilley
BWill wrote: > and ixnay on the ubyray or else I'll tell you where to stick your > endblock delimiter :P OK, I can't help it... which is more readable: a_string.reverse(ruby) a_string[::-1] (python) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Love :)

2006-03-12 Thread BWill
al pacino wrote: > Paddy wrote: >> Spread the love - tell your Java freinds :-) > > well said paddy ! :-)) > and ixnay on the ubyray or else I'll tell you where to stick your endblock delimiter :P -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Love :)

2006-03-12 Thread al pacino
Paddy wrote: > Spread the love - tell your Java freinds :-) well said paddy ! :-)) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Love :)

2006-03-12 Thread Paddy
Spread the love - tell your Java freinds :-) -- http://mail.python.org/mailman/listinfo/python-list

Python Love :)

2006-03-11 Thread mwt
I've only been goofing around with Python for about a month now, but already I am in love. I never get that feeling -- so common with Java -- that I'm swimming upstream, struggling to force the language to do what I want. Python makes it feel effortless and easy. -- http://mail.python.org/mailman