id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 10479 Use funtools.partial instead of django.utils.functional.curry Sebastian Noack nobody "Django's curry method is just an implementation of Python 2.5's (and above) partial class from the functools module. But because of functools.partial is implemented as C extension, it is way faster than django's implementation. {{{ # python2.5 -m timeit -s 'from django.utils.functional import curry; f = curry(lambda x: x, ""foo"")' 'f()' 100000 loops, best of 3: 2.27 usec per loop # python2.5 -m timeit -s 'from functools import partial; f = partial(lambda x: x, ""foo"")' 'f()' 1000000 loops, best of 3: 0.417 usec per loop }}} So, is there a reason for not using partial instead of curry on Python2.5 and above? We could introduce a funccompat module and use it the same way as the itercompat module for example." Uncategorized closed Uncategorized 1.0 Normal wontfix Unreviewed 0 0 0 0 0 0