Re: 450 Pound Library Program

2006-02-09 Thread mwt
BTW - I can't find any code examples of how to interrupt a beast like this. A regular ctrl-c doesn't work, since the separate threads just keep executing. Is this a case where you need to iterate through all threads and stop each one individually? How would that look? -- http://mail.python.org/ma

Re: 450 Pound Library Program

2006-02-08 Thread mwt
A million thanks for in-depth critique. I look forward to figuring out half of what you're talking about ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: 450 Pound Library Program

2006-02-08 Thread bruno at modulix
Magnus Lycka wrote: > [EMAIL PROTECTED] wrote: > >> Ok, >> >> I give up. DRY = Don't Repeat Yourself (google Pragmatic Programmers) >> but SPOT? Google is little help here, SPOT is too common a word. > > > The only SPOT I worked with (as I know of) was SPOT4 > (Le Systeme Pour 'l Observation de

Re: 450 Pound Library Program

2006-02-08 Thread bruno at modulix
[EMAIL PROTECTED] wrote: > Ok, > > I give up. DRY = Don't Repeat Yourself (google Pragmatic Programmers) > but SPOT? Google is little help here, SPOT is too common a word. Single Point Of Truth (or Single Point Of Transformation) And before you mention it, yes, it's *almost* the same thing as D

Re: 450 Pound Library Program

2006-02-08 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: > Ok, > > I give up. DRY = Don't Repeat Yourself (google Pragmatic Programmers) > but SPOT? Google is little help here, SPOT is too common a word. The only SPOT I worked with (as I know of) was SPOT4 (Le Systeme Pour 'l Observation de la Terre) but that's probably not it

Re: 450 Pound Library Program

2006-02-08 Thread plahey
Ok, I give up. DRY = Don't Repeat Yourself (google Pragmatic Programmers) but SPOT? Google is little help here, SPOT is too common a word. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: 450 Pound Library Program

2006-02-08 Thread Sion Arrowsmith
mwt <[EMAIL PROTECTED]> wrote: >while len(self.stacks) == 0: To (kind of) repeat myself, the idiomatic Python would be: while not self.stacks: An empty list is considered to be false, hence testing the list itself is the same as testing len(l) > 0 . As someone else has noticed,

Re: 450 Pound Library Program

2006-02-08 Thread bruno at modulix
Magnus Lycka wrote: > just a few style notes... > (snip) > > Why bother with L? The follwing is as clear I think, and solves > the problem of commas in the title. Also, don't put a space between > the callable and the parenthesis please. See the Python style guide, > PEP 008. > > aut

Re: 450 Pound Library Program

2006-02-08 Thread bruno at modulix
mwt wrote: > So in a further attempt to learn some Python, I've taken the little > Library program > (http://groups.google.com/group/comp.lang.python/browse_thread/thread/f6a9ccf1bc136f84) > I wrote and added several features to it. Readers now quit when they've > read all the books in the Library.

Re: 450 Pound Library Program

2006-02-08 Thread Magnus Lycka
just a few style notes... > def checkOutBook(self, readerName): > "'Remove book from the front of the list, block if no books are > available'" I don't understand what "' is supposed to imply. If you meant to use triple quoting, you need to use ''' or """. Then the string can contain