Re: Secretly passing parameter to function

2012-12-06 Thread Paul Rubin
Paul Rubin writes: > from functools import partial > do(partial(step1, param = None)) Or more directly: do(lambda: step1(param = None)) -- http://mail.python.org/mailman/listinfo/python-list

Re: Secretly passing parameter to function

2012-12-06 Thread Paul Rubin
Olivier Scalbert writes: > # We ask the framework to do some work. > do(step1, param = None) from functools import partial do(partial(step1, param = None)) -- http://mail.python.org/mailman/listinfo/python-list

Re: Secretly passing parameter to function

2012-12-05 Thread Modulok
> Hi all ! > > I have a problem that is not easy to explained, so I have tried to > reduce it a lot. > > We are using a framework, that we can not modify. > > in framework.py: > def do(something): > ''' > Here we are in a framework that can not be modified ... > It does a lot of things

Re: Secretly passing parameter to function

2012-12-05 Thread Chris Kaynor
On Wed, Dec 5, 2012 at 10:50 AM, Olivier Scalbert < olivier.scalb...@algosyn.com> wrote: > Hi all ! > > I have a problem that is not easy to explained, so I have tried to reduce > it a lot. > > We are using a framework, that we can not modify. > > in framework.py: > def do(something): >''' >

Re: Secretly passing parameter to function

2012-12-05 Thread Dave Angel
On 12/05/2012 01:50 PM, Olivier Scalbert wrote: > Hi all ! > > I have a problem that is not easy to explained, so I have tried to > reduce it a lot. > > We are using a framework, that we can not modify. > > in framework.py: > def do(something): >''' >Here we are in a framework that can not

Secretly passing parameter to function

2012-12-05 Thread Olivier Scalbert
Hi all ! I have a problem that is not easy to explained, so I have tried to reduce it a lot. We are using a framework, that we can not modify. in framework.py: def do(something): ''' Here we are in a framework that can not be modified ... It does a lot of things and finally: '