Re: advice needed for lazy evaluation mechanism

2009-11-12 Thread Steven D'Aprano
On Thu, 12 Nov 2009 08:53:57 +0100, Dieter Maurer wrote: > Steven D'Aprano writes on 10 Nov > 2009 19:11:07 GMT: >> ... >> > So I am trying to restructure it using lazy evaluation. >> >> Oh great, avoiding confusion with something even more confusing. > > Lazy evaluation may be confusing if it

Re: advice needed for lazy evaluation mechanism

2009-11-11 Thread Dieter Maurer
Steven D'Aprano writes on 10 Nov 2009 19:11:07 GMT: > ... > > So I am trying to restructure it using lazy evaluation. > > Oh great, avoiding confusion with something even more confusing. Lazy evaluation may be confusing if it is misused. But, it may be very clear and powerful if used appropriat

Re: advice needed for lazy evaluation mechanism

2009-11-10 Thread Steven D'Aprano
On Sun, 08 Nov 2009 14:41:27 -0800, markolopa wrote: > Hi, > > Could you please give me some advice on the piece of code I am writing? > > My system has several possible outputs, some of them are not always > needed. I started to get confused with the code flow conditions needed > to avoid doing

Re: advice needed for lazy evaluation mechanism

2009-11-09 Thread markolopa
On Nov 9, 1:34 am, MRAB wrote: > markolopa wrote: > > Hi again, > > > I put a copy of the message and the tarball of the code here (because > > of the problem of line breaks): > > >http://python-advocacy.wikidot.com/comp-lang-python-question > > Here's a slightly different approach: A clean and e

Re: advice needed for lazy evaluation mechanism

2009-11-08 Thread MRAB
markolopa wrote: Hi again, I put a copy of the message and the tarball of the code here (because of the problem of line breaks): http://python-advocacy.wikidot.com/comp-lang-python-question Here's a slightly different approach: repository.py = class Repository(object): def __

Re: advice needed for lazy evaluation mechanism

2009-11-08 Thread markolopa
Hi again, I put a copy of the message and the tarball of the code here (because of the problem of line breaks): http://python-advocacy.wikidot.com/comp-lang-python-question Thanks! Marko -- http://mail.python.org/mailman/listinfo/python-list

advice needed for lazy evaluation mechanism

2009-11-08 Thread markolopa
Hi, Could you please give me some advice on the piece of code I am writing? My system has several possible outputs, some of them are not always needed. I started to get confused with the code flow conditions needed to avoid doing unnecessary work. So I am trying to restructure it using lazy evalu