﻿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
27382	Document that ugettext_lazy() result can't be used with arbitrary Python code	Mike Edmunds	nobody	"The documentation [https://docs.djangoproject.com/en/1.10/topics/i18n/translation/#working-with-lazy-translation-objects currently states] that:

  The result of a `ugettext_lazy()` call can be used wherever you would use a unicode string (an object with type `unicode`) in Python.

However, the result of ugettext_lazy() does not pass `isinstance(lazy_obj, unicode)`. Because instance checks are commonly used to detect text strings, the lazy objects are incompatible with some Python standard library code and other popular Python packages (such as requests).

Proposed doc patch clarifies that ugettext_lazy() can be used with other Django code, but that it should generally be converted to text before passing to arbitrary, non-Django Python code.

Discussion and examples on django-dev: https://groups.google.com/forum/#!topic/django-developers/eFsGf1ZrG7c
"	Bug	closed	Documentation	1.10	Normal	fixed	ugettext_lazy		Accepted	1	0	0	0	0	0
