Re: [Tutor] n.isalnum() is failing

2007-07-06 Thread Terry
Hi Janos, Quote: Your logic is backward, and mine is the forward, isn't it? ;) The Story of My Life! --Terry On Thu, 2007-07-05 at 07:30 +0200, János Juhász wrote: > > Hi Terry > > > "According to the Gregorian calendar, which is the civil calendar in > use > > today, years evenly divisib

[Tutor] [Fwd: [Fwd: Re: n.isalnum() is failing]]

2007-07-06 Thread Terry
Hi Alan, Yes! That is succinct and sweet! I think I like that one the best of all! Terry Forwarded Message From: Alan Gauld <[EMAIL PROTECTED]> To: tutor@python.org Subject: Re: [Tutor] n.isalnum() is failing Date: Thu, 5 Jul 2007 10:17:16 +0100 "János Juhász" <[EMAIL PROTECT

Re: [Tutor] lambda: print('x') raises SyntaxError?

2007-07-06 Thread wcyee
Ahh. It seems so obvious now. :) Thanks, Wesley & Kent! On 7/5/07, wesley chun <[EMAIL PROTECTED]> wrote: On 7/5/07, Kent Johnson <[EMAIL PROTECTED]> wrote: > wc yeee wrote: > > Hi. Is there a reason the code below raises a syntax error? It's > > probably something silly on my part, but I can

Re: [Tutor] back on bytes

2007-07-06 Thread Jerry Hill
On 7/6/07, shawn bright <[EMAIL PROTECTED]> wrote: > i have a number 12480 > i have a low byte of 192 and a high byte of 176 Maybe I'm being dense, but that doesn't make any sense at all to me. The high byte of 12480 is 48, and the low byte is 192, isn't it? Because (48 * 256) + 192 = 12480? In y

[Tutor] back on bytes

2007-07-06 Thread shawn bright
hello all, i have a number 12480 i have a low byte of 192 and a high byte of 176 so i can do this IDLE 1.2.1 No Subprocess >>> (176 & 127) * 256 + 192 12480 but if i start with the 12480, how do i get the two bytes (lo and hi) that make it up? i kinda know what i am doing here,

Re: [Tutor] How can I escape a pound symbol in my script?

2007-07-06 Thread Tim Golden
ron wrote: > in the US, # is a symbol for weight, not currency. I didn't know that; I assumed it was only used for ordinal numbering (as in Item #3). # How do you write out, with a quick symbol, "I'm going to > buy 3# of potatoes? Assuming that "you" is us Brits, then: 3lb (that's lowerca

Re: [Tutor] How can I escape a pound symbol in my script?

2007-07-06 Thread ron
in the US, # is a symbol for weight, not currency. How do you write out, with a quick symbol, "I'm going to buy 3# of potatoes? Of course now you're metric, but did you also use 'pounds' for weight before that? _

Re: [Tutor] How can I escape a pound symbol in my script?

2007-07-06 Thread Michael Connors
"And this is really off-topic now! :-)" Really interesting though, hopefully it will come up in a pub quiz. On 06/07/07, Alan Gauld <[EMAIL PROTECTED]> wrote: "Kent Johnson" <[EMAIL PROTECTED]> wrote > > is of course an historical feature of old keyboards > > when, to get a hash symbol (#), yo

Re: [Tutor] How can I escape a pound symbol in my script?

2007-07-06 Thread Alan Gauld
"Kent Johnson" <[EMAIL PROTECTED]> wrote > > is of course an historical feature of old keyboards > > when, to get a hash symbol (#), you had to type a > > pound sign(£), ie shift 3. > > That is a very interesting explanation but I prefer this one: > http://en.wikipedia.org/wiki/Number_sign#Naming_

Re: [Tutor] How can I escape a pound symbol in my script?

2007-07-06 Thread Kent Johnson
Alan Gauld wrote: > Moving somewhat off topic... > >>> file). I need to write out a pound sign '#' to the file >> Works fine here: >> $ python -c 'open("foo","w").write("£")' > > I always find it amusing when Americans refer to the > hash or square symbol (#) as a pound sign (£). This > is of cou

Re: [Tutor] How can I escape a pound symbol in my script?

2007-07-06 Thread Alan Gauld
Moving somewhat off topic... > > file). I need to write out a pound sign '#' to the file > Works fine here: > $ python -c 'open("foo","w").write("£")' I always find it amusing when Americans refer to the hash or square symbol (#) as a pound sign (£). This is of course an historical feature of old