Re: More Django optimization

2007-12-25 Thread Ivan Illarionov
I think this is because functools.partial is written as C extension. You can't get the code object from them for inspection. But you still can call them, get/set custom attributes, get the curried function as func attribute, get curried args from args attribute and curried keyword arguments from k

Re: More Django optimization

2007-12-24 Thread Jeremy Dunck
On Dec 24, 2007 4:17 PM, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > I suggest using python 2.5 standard library functools.partial when it > is available instead of django.utils.functional.curry. This functions > are technically the same with the exception that partial is written in > C and is

Re: More Django optimization

2007-12-24 Thread Ivan Illarionov
Sadly, it cannot be used out of the box, partial objects don't work with dispatcher and some unit test failed when I tried to use it in models.base. But it could be integrated slowly. On 25 дек, 01:17, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > I suggest using python 2.5 standard library functo

More Django optimization

2007-12-24 Thread Ivan Illarionov
I suggest using python 2.5 standard library functools.partial when it is available instead of django.utils.functional.curry. This functions are technically the same with the exception that partial is written in C and is about 2 times faster. Just replace every: from django.utils.functional import