﻿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
12176	curry can't be replaced by functools.partial	bear330	nobody	"I think this should not be a bug.

I do this before:
{{{
#!python
# We make sure we are using Python 2.5, so partial is faster than
# django's curry function.
import functools
from django.utils import functional
functional.curry = functools.partial
}}}

This works fine at 1.0.2 and previous versions.

After I upgrade to 1.0.4, I got many problems while rendering template. I do some investigation, the problem is because 
{{{
#!python
def _render_value_in_context(value, context):
    """"""
    Converts any value to a string to become part of a rendered template. This
    means escaping, if required, and conversion to a unicode object. If value
    is a string, it is expected to have already been translated.
    """"""
    value = force_unicode(value)
    if (context.autoescape and not isinstance(value, SafeData)) or isinstance(value, EscapeData):
        return escape(value)
    else:
        return value
}}}

While rendering node, force_unicode a SafeString will raise error. 

I am just curious, why can't I replace curry with functools.partial?

Thanks."		closed	Template system	dev		invalid	curry partial		Unreviewed	0	0	0	0	0	0
