Re: [Tutor] a function I fail to understand

2011-03-22 Thread David
Hey guys, thanks for all this help, I now got a clearer picture. Given the confusion as to the CHAR_MAP I am attaching the entire file. It comes, btw, out of Jeff McNeil's "Python 2.6 Text Processing" book (Packt), p. 11. Happy hacking, David On 03/22/2011 06:45 AM, Dave Angel wrote: > On 0

Re: [Tutor] a function I fail to understand

2011-03-21 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Alex Hall wrote: On 3/21/11, David wrote: Hello list, I am having trouble understanding the following function. What trips me up is the "letter = letter.lower()" line. As I understand, the function takes a letter and assigns True to a letter if it is upper case. No

Re: [Tutor] a function I fail to understand

2011-03-21 Thread Marc Tompkins
On Mon, Mar 21, 2011 at 6:06 PM, David wrote: > Hello list, > > I am having trouble understanding the following function. What trips me > up is the "letter = letter.lower()" line. > > As I understand, the function takes a letter and assigns True to a > letter if it is upper case. > > But then he

Re: [Tutor] a function I fail to understand

2011-03-21 Thread Alex Hall
On 3/21/11, David wrote: > Hello list, > > I am having trouble understanding the following function. What trips me > up is the "letter = letter.lower()" line. > > As I understand, the function takes a letter and assigns True to a > letter if it is upper case. No, the function takes a letter and re

[Tutor] a function I fail to understand

2011-03-21 Thread David
Hello list, I am having trouble understanding the following function. What trips me up is the "letter = letter.lower()" line. As I understand, the function takes a letter and assigns True to a letter if it is upper case. But then he goes to letter = letter.lower() and all letters are converted