Re: [Tutor] optimize code

2008-12-30 Thread Kent Johnson
On Tue, Dec 30, 2008 at 3:42 PM, Norman Khine wrote: > Hi, > I have an updated version at http://paste.lisp.org/display/72843 > Thanks for the advice, the code is much smaller and leaner than the first > attempt. The level2-4 code could all be consolidated into a loop: for levelName in 'level2 l

Re: [Tutor] optimize code

2008-12-30 Thread Norman Khine
Hi, I have an updated version at http://paste.lisp.org/display/72843 Thanks for the advice, the code is much smaller and leaner than the first attempt. Norman Kent Johnson wrote: On Tue, Dec 30, 2008 at 9:32 AM, Norman Khine wrote: Hello, I have this piece of code which I would like to furth

Re: [Tutor] optimize code

2008-12-30 Thread Norman Khine
Kent Johnson wrote: On Tue, Dec 30, 2008 at 9:32 AM, Norman Khine wrote: Hello, I have this piece of code which I would like to further streamline it. There is no need to re-create the mapping at each level of if; you can just add new key/value pairs. For example if leve

Re: [Tutor] optimize code

2008-12-30 Thread Kent Johnson
On Tue, Dec 30, 2008 at 9:32 AM, Norman Khine wrote: > Hello, > I have this piece of code which I would like to further streamline it. There is no need to re-create the mapping at each level of if; you can just add new key/value pairs. For example if level2 is not None:

[Tutor] optimize code

2008-12-30 Thread Norman Khine
Hello, I have this piece of code which I would like to further streamline it. http://paste.lisp.org/display/72830 More specifically, I feel there is too many if statements. What the code does is that it takes a form value and builds a dictionary http://localhost/;search?level1=air-brokers-or-c