Structure using whitespace vs logical whitespace

2008-12-15 Thread cmdrrickhun...@yaho.com
I've been trying to search through the years of Python talk to find an answer to this, but my Googlefu is weak. In most languages, I'll do something like this xmlWriter.BeginElement("parent"); xmlWriter.BeginElement("child"); --xml.Writer.Characters("subtext"); xmlWriter.EndElemen

Re: Structure using whitespace vs logical whitespace

2008-12-15 Thread cmdrrickhun...@yaho.com
On Dec 15, 11:10 am, Terry Reedy wrote: > > In general, I'm using indentation to show logical flow through code. > > That, of course, is what Python does. > Python does NOT use indentation to show logical flow. It uses it to show syntactical flow. The XML writer is the perfect example of a case

Re: Managing timing in Python calls

2008-12-15 Thread cmdrrickhun...@yaho.com
I believe WxTimerEvent is handled using the event queue, which isn't going to do what you want. An event which goes through the queue does not get processed until you return to the queue. What you want to do is actually a rather difficult task to do generically. Should the task be interrupted im

Re: stable algorithm with complexity O(n)

2008-12-15 Thread cmdrrickhun...@yaho.com
Just because its such an interesting problem, I'll take a stab at it. It can be proven that you cannot sort an arbitrarily large set of numbers, given no extra information, faster than O(n log n). It is provable using information theory. However, if your teacher is giving you evil problems, ther