Re: A rather unpythonic way of doing things

2005-10-01 Thread Tom Anderson
On Thu, 29 Sep 2005, Peter Corbett wrote: > One of my friends has recently taken up Python, and was griping a bit > about the language (it's too "prescriptive" for his tastes). In > particular, he didn't like the way that Python expressions were a bit > crippled. So I delved a bit into the lang

Re: A rather unpythonic way of doing things

2005-09-29 Thread Simon Brunning
On 9/29/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > "fraca7" wrote: > > > print ''.join(map(lambda x: chrord(x) - ord('a')) + 13) % 26) + > > ord('a')), 'yvfc')) > > that's spelled > > print "yvfc".decode("rot-13") > > or, if you prefer, > > print "yvfc".encode("rot-13") > > , in co

Re: A rather unpythonic way of doing things

2005-09-29 Thread Fredrik Lundh
"fraca7" wrote: > print ''.join(map(lambda x: chrord(x) - ord('a')) + 13) % 26) + > ord('a')), 'yvfc')) that's spelled print "yvfc".decode("rot-13") or, if you prefer, print "yvfc".encode("rot-13") , in contemporary python. -- http://mail.python.org/mailman/listinfo/python

Re: A rather unpythonic way of doing things

2005-09-29 Thread Rocco Moretti
fraca7 wrote: > Richie Hindle a écrit : > >> [Peter] >> >>> http://www.pick.ucam.org/~ptc24/yvfc.html >> >> >> >> [Jeff] >> >>> Yuma Valley Agricultural Center? >>> Yaak Valley Forest Council? >> >> >> >> I went through the same process. My guess is "Yes, Very F'ing Clever." >> Peter? >> > > pri

Re: A rather unpythonic way of doing things

2005-09-29 Thread Richie Hindle
[Peter] > http://www.pick.ucam.org/~ptc24/yvfc.html [fraca7] > print ''.join(map(lambda x: chrord(x) - ord('a')) + 13) % 26) + > ord('a')), 'yvfc')) Ah! Or more easily, Edit / Apply ROT13. Thanks! -- Richie Hindle [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: A rather unpythonic way of doing things

2005-09-29 Thread Cyril Bazin
"Crypthonic" could be the exact word...On 29 Sep 2005 15:19:11 +0100, Peter Corbett <[EMAIL PROTECTED] > wrote:Richie Hindle <[EMAIL PROTECTED] > writes:>> [Peter]> > http://www.pick.ucam.org/~ptc24/yvfc.html>> [Jeff]> > Yuma Valley Agricultural Center? > > Yaak Valley Forest Council?>> I went thro

Re: A rather unpythonic way of doing things

2005-09-29 Thread Jeff Schwab
fraca7 wrote: > Richie Hindle a écrit : > >> [Peter] >> >>> http://www.pick.ucam.org/~ptc24/yvfc.html >> >> >> >> [Jeff] >> >>> Yuma Valley Agricultural Center? >>> Yaak Valley Forest Council? >> >> >> >> I went through the same process. My guess is "Yes, Very F'ing Clever." >> Peter? >> > > pri

Re: A rather unpythonic way of doing things

2005-09-29 Thread fraca7
Richie Hindle a écrit : > [Peter] > >>http://www.pick.ucam.org/~ptc24/yvfc.html > > > [Jeff] > >>Yuma Valley Agricultural Center? >>Yaak Valley Forest Council? > > > I went through the same process. My guess is "Yes, Very F'ing Clever." > Peter? > print ''.join(map(lambda x: chrord(x)

Re: A rather unpythonic way of doing things

2005-09-29 Thread Michael Ekstrand
On Thursday 29 September 2005 04:53, Peter Corbett wrote: > One of my friends has recently taken up Python, and was griping a bit > about the language (it's too "prescriptive" for his tastes). In > particular, he didn't like the way that Python expressions were a bit > crippled. So I delved a bit i

Re: A rather unpythonic way of doing things

2005-09-29 Thread Peter Corbett
Richie Hindle <[EMAIL PROTECTED]> writes: > > [Peter] > > http://www.pick.ucam.org/~ptc24/yvfc.html > > [Jeff] > > Yuma Valley Agricultural Center? > > Yaak Valley Forest Council? > > I went through the same process. My guess is "Yes, Very F'ing Clever." > Peter? You're all thinking about it t

Re: A rather unpythonic way of doing things

2005-09-29 Thread Richie Hindle
[Peter] > http://www.pick.ucam.org/~ptc24/yvfc.html [Jeff] > Yuma Valley Agricultural Center? > Yaak Valley Forest Council? I went through the same process. My guess is "Yes, Very F'ing Clever." Peter? -- Richie Hindle [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: A rather unpythonic way of doing things

2005-09-29 Thread Jeff Schwab
Peter Corbett wrote: > One of my friends has recently taken up Python, and was griping a bit > about the language (it's too "prescriptive" for his tastes). In > particular, he didn't like the way that Python expressions were a bit > crippled. So I delved a bit into the language, and found some sour

Re: A rather unpythonic way of doing things

2005-09-29 Thread Paul Rubin
Peter Corbett <[EMAIL PROTECTED]> writes: > http://www.pick.ucam.org/~ptc24/yvfc.html > Madness! I love it. -- http://mail.python.org/mailman/listinfo/python-list

Re: A rather unpythonic way of doing things

2005-09-29 Thread Richie Hindle
[Peter] > http://www.pick.ucam.org/~ptc24/yvfc.html Beautiful! Greenspun's Tenth Rule[1] performed before your very eyes! (Not quite, because you started with Python so you were already half way there. And yours probably isn't buggy. 8-) [1] http://en.wikipedia.org/wiki/Greenspun's_Tenth_Rule

A rather unpythonic way of doing things

2005-09-29 Thread Peter Corbett
One of my friends has recently taken up Python, and was griping a bit about the language (it's too "prescriptive" for his tastes). In particular, he didn't like the way that Python expressions were a bit crippled. So I delved a bit into the language, and found some sources of syntactic sugar that I