Re: Python/Django decorators with arguments

2011-06-28 Thread Russell Keith-Magee
On Wed, Jun 29, 2011 at 12:22 AM, Jigar Tanna wrote: > hey, > > I am new to Python and Django, was going through the concept of > decorators where I came across a special case of using arguments with > decorators > Below is the code for memoization where I was looking at the > concept... > > cache

Python/Django decorators with arguments

2011-06-28 Thread Jigar Tanna
hey, I am new to Python and Django, was going through the concept of decorators where I came across a special case of using arguments with decorators Below is the code for memoization where I was looking at the concept... cache = {} def get_key(function, *args, **kw) : key = '%s. %s: ' % (fun