Re: statement level resumable exception

2011-01-21 Thread Jon Clements
On Jan 21, 8:41 am, ilejn wrote: > Arnaud, > > it looks like a solution. > Perhaps it is better than plain try/accept and than proxy class with > __getattr__. > It is not for free, e.g. because syntax check such as parentheses > matching is lazy too, though looks > very interesting. > > Thanks a l

Re: statement level resumable exception

2011-01-21 Thread ilejn
Arnaud, it looks like a solution. Perhaps it is better than plain try/accept and than proxy class with __getattr__. It is not for free, e.g. because syntax check such as parentheses matching is lazy too, though looks very interesting. Thanks a lot! On Jan 21, 10:41 am, Arnaud Delobelle wrote: >

Re: statement level resumable exception

2011-01-20 Thread Arnaud Delobelle
ilejn writes: > Arnaud, > > these lists are not generated. > > Actually these lists are a sort of interpreted programs and contain > some application logic. > > Here is an example > [ > [PUSH, [get_modified_interface, req]], > [TIMEOUT, 3], > [PULL, [out_interface,

Re: statement level resumable exception

2011-01-20 Thread ilejn
Arnaud, these lists are not generated. Actually these lists are a sort of interpreted programs and contain some application logic. Here is an example [ [PUSH, [get_modified_interface, req]], [TIMEOUT, 3], [PULL, [out_interface, '']], [PULL, [err_interface,

Re: statement level resumable exception

2011-01-20 Thread Emile van Sebille
On 1/20/2011 11:49 AM ilejn said... Chris, this is a long story why arguments may be not known. Briefly these arguments come (or may come) from XML and may be not specified. A function call which does not have all arguments defined must be skipped as gracefully as possible. What I am asking abo

Re: statement level resumable exception

2011-01-20 Thread Arnaud Delobelle
ilejn writes: > Arnaud, > > good idea, though I think it is not applicable in my case, > because my arg1 ... argN are "complex multilayer lists". > > In reality it is not just > f(arg1), > it is more like > f([[subarg1, 'aa', subarg2], []]) > > Regarding your remark it is a strange problem ... we

Re: statement level resumable exception

2011-01-20 Thread ilejn
Arnaud, good idea, though I think it is not applicable in my case, because my arg1 ... argN are "complex multilayer lists". In reality it is not just f(arg1), it is more like f([[subarg1, 'aa', subarg2], []]) Regarding your remark it is a strange problem ... well, may be it is ;) Thanks anyway.

Re: statement level resumable exception

2011-01-20 Thread Arnaud Delobelle
ilejn writes: > Hello! > > I have a sequence of a function calls. Basically it looks like > > f(arg1) > f(arg2) > ... > f(argN) > > though real arguments are complex multilayer lists. > > The problem is some arguments are not known and I get NameError > exceptions. > > The solutions I know > 1. w

Re: statement level resumable exception

2011-01-20 Thread ilejn
Chris, this is a long story why arguments may be not known. Briefly these arguments come (or may come) from XML and may be not specified. A function call which does not have all arguments defined must be skipped as gracefully as possible. What I am asking about is how to achieve this goal. Thank

Re: statement level resumable exception

2011-01-20 Thread Chris Rebert
On Thu, Jan 20, 2011 at 9:32 AM, ilejn wrote: > Hello! > > I have a sequence of a function calls. Basically it looks like > > f(arg1) > f(arg2) > ... > f(argN) > > though real arguments are complex multilayer lists. > > The problem is some arguments are not known and I get NameError > exceptions.

statement level resumable exception

2011-01-20 Thread ilejn
Hello! I have a sequence of a function calls. Basically it looks like f(arg1) f(arg2) ... f(argN) though real arguments are complex multilayer lists. The problem is some arguments are not known and I get NameError exceptions. The solutions I know 1. wrap every f call in try/except block 2. mak