Re: [Tutor] Really miss the C preprocessor!!

2010-03-06 Thread Steven D'Aprano
On Sat, 6 Mar 2010 07:17:43 pm you wrote: > I thought about suggesting using decorators for this, since I've done > something similar (not exactly exponential backoff, but retrying a > few times on exception). However, as I started writing the example, I > got stuck at expressing a generic way to

Re: [Tutor] Really miss the C preprocessor!!

2010-03-05 Thread Steven D'Aprano
On Sat, 6 Mar 2010 04:13:49 pm Gil Cosson wrote: > I have some code to perform an exponential backoff. I am interacting > with a few different web services. Checking for a specific Exception > and then re-invoking the failed call after waiting a bit. I don't > want to  code the backoff in ten diffe

[Tutor] Really miss the C preprocessor!!

2010-03-05 Thread Gil Cosson
I have some code to perform an exponential backoff. I am interacting with a few different web services. Checking for a specific Exception and then re-invoking the failed call after waiting a bit. I don't want to  code the backoff in ten different places. Really miss the C pre-processor. I am t