[Tutor] Truckers Log....Me Again

Erik Price erikprice@mac.com
Mon, 21 Jan 2002 23:51:31 -0500


Well!  I don't think I've ever been so warmly received by any online 
community before I introduced myself!  I just wanted to take a minute to 
thank everyone who responded to my pondering of the 'while 1' statement.

Every day I get a few pages further in learning about this language 
(well, starting not too long ago) from various online resources, though 
I haven't written anything functional with Python yet.  I'm intrigued -- 
coming from PHP, which resembles Perl imho, and is interspersed with 
HTML, the code looks decidedly naked!  I'm not used to seeing code 
without all the doo-dads (like bucks and braces).

Today I learned about tuples and dictionaries.  I'm not going to come to 
any conclusions about the language until I've gotten to play with it 
some (just too busy with Work at the moment), but I am initially 
surprised by the separate distinction of lists and dictionaries (which, 
unconsciously, I end up replacing with numeric and associative arrays -- 
a habit that I am trying to break).

The questions are bottling up inside me.  I'm going to wait until I 
finish reading, a few more days, to see if they answer themselves.  But 
if not, I hope nobody minds the barrage I'll unleash -- I'm the curious 
sort!  (It's curiosity that brought me around to Python.)  The one that 
I really can't wait to ask, given the discussion about its absence in 
last night's pseudocode, is about the 'break' statement.  Between the 
tutorials I'm reading and discussion on this list, it seems to be used 
more frequently than the 'break' statement which appears in PHP.  Is 
this normal for Python?  I'm new to programming, and everywhere I look, 
people are talking about "good habits".  Naturally I want to make sure 
that I don't develop any bad ones.  It's not considered "bad programming 
style" to depend heavily on the 'break' statement in Python, is it?

I'm also a stickler for detail.  A question about quoting -- I have seen 
double and single quotes used fairly interchangeably.  My reference 
doesn't distinguish a difference between these (only that escaping 
singlequotes inside doublequotes or vice versa isn't necessary, or in 
triple (single|double) quotes).  But in PHP/Perl/bash, variables expand 
in double-quotes so the difference is important.  Where does Python 
stand on this subject?  (I'm surprised that I didn't read something 
about this already.)

And I apologize for constantly making reference to PHP or other 
languages, it's just that in programming, they're my only frame of 
reference.

Thanks everyone,

Erik