Re: Top down Python

2014-02-12 Thread John Allsup
, John Allsup wrote: What is needed for proper learning is near-absolute simplicity. Even one toy too many to play with is an intolerable distraction, but one too few massively hampers learning and induces boredom. I want to be able to say: 1. Put a nice picture on the background. 2. Put

Re: Top down Python

2014-02-12 Thread John Allsup
world work and energy) as possible. Hope this starts to clarify the picture I have in my head. All the best, John On 12/02/2014 07:42, Chris Angelico wrote: On Wed, Feb 12, 2014 at 6:05 PM, John Allsup py...@allsup.co wrote: 1. Put a nice picture on the background. 2. Put a terminal

Re: Top down Python

2014-02-12 Thread John Allsup
and, thus, ought to be findable. John On 12/02/2014 08:09, Ben Finney wrote: John Allsup py...@allsup.co writes: What is needed for proper learning is near-absolute simplicity. I think that's too simplistic :-) but I'll take it as merely a preference on your part for simplicity at this time. I want

Top down Python

2014-02-11 Thread John Allsup
What is needed for proper learning is near-absolute simplicity. Even one toy too many to play with is an intolerable distraction, but one too few massively hampers learning and induces boredom. I want to be able to say: 1. Put a nice picture on the background. 2. Put a terminal window

Re: How to write this as a list comprehension?

2014-01-18 Thread John Allsup
Hi, I'd agree with the advice that it's not the best idea: readability sucks here, but consider the following: import time def somefunc(a,b,c,d): # dummy function return {} - {} - {} : {}.format(a,b,c,d) l = [(time.time(),name {}.format(n)) for n in range(100)] # dummy data # the line

Ifs and assignments

2014-01-02 Thread John Allsup
Hi, This is my debut on this list. In many languages, such as C, one can use assignments in conditionals and expressions. The most common, and useful case turns up when you have if/else if/else if/else constructs. Consider the following non-working pseudoPython. import re r1 =

Re: Ifs and assignments

2014-01-02 Thread John Allsup
as happens with C). This occurs further down in my original post (past the point where you inserted your reply). Another post suggested a workaround by defining a 'pocket' class, for which I am grateful. John On 02/01/2014 19:27, Gary Herron wrote: On 01/02/2014 09:20 AM, John Allsup wrote: Hi