[Tutor] can you turn strings from a file into raw strings?

Brian van den Broek bvande at po-box.mcgill.ca
Mon Apr 12 03:37:40 EDT 2004


Jonathan Hayward said unto the world upon 09/04/2004 06:23:
> 
>>
>> I think I confused myself by assuming that stuff that worked one way 
>> in the interactive prompt on strings typed in as literals and assigned 
>> to variables would work the same on a string taken from 
>> file.readline(). Clearly I need to know more about Python before 
>> running around making assumptions!
> 
> 
> Go ahead and make mistakes, and let other people see your assumptions. 
> It's one of the best ways to learn, and Tutor has people who will gently 
> correct your assumptions.
> 
> Neil Postman, in _The End of Education_, talked about mistakes. He 
> describes them as a valuable opportunity for a teacher to see what a 
> student is thinking, and offer guidance that the teacher might not know 
> to offer. Someone said, 'You need to make a million mistakes to learn a 
> language, so get cracking!'
> 

Hi all,

I've been away from the computer for a few days, so I am
consolidating thanks and replies to several respondents into one
post.

My experience so far amply bears out Jonathan's point about
"gently". I've managed to talk out of my hat in more than one post
so far, and yet no flames :-)

Alan, I take your point that I should post actual code. In
retrospect, formalizing my concern would either resolve it of
focus it.

Roy, thanks for the suggestion of Learning Python. I have it, and
thought it was quite accessible and more comprehensive than the
other accessible presentations I'd seen on the net. You mentioned
you are half-way through. If I may suggest, don't do what I did --
I read it on the bus, reading through without frequent time at the
keyboard. I've retained the forest, but some of the details are
hazy. This thread proves the last point, if nothing else :-)

So, thanks to all on the list for being kind as I publicly stumble
towards understanding! (Apologies if I overlooked any responses.)

Best to all,

Brian vdB









More information about the Tutor mailing list