#24454: SimpleLazyObject __repr__ does not work for collections.namedtuple
-------------------------+-------------------------------------------------
Reporter: | Owner: nobody
EmilTemirov |
Type: Bug | Status: new
Component: Core | Version: 1.6
(Other) | Keywords: SimpleLazyObject, namedtuple,
Severity: Normal | __repr__
Triage Stage: | Has patch: 1
Unreviewed |
Easy pickings: 0 | UI/UX: 1
-------------------------+-------------------------------------------------
Patch:
{{{
--- a/django/utils/functional.py
+++ b/django/utils/functional.py
@@ -349,7 +349,7 @@ class SimpleLazyObject(LazyObject):
repr_attr = self._setupfunc
else:
repr_attr = self._wrapped
- return '<SimpleLazyObject: %r>' % repr_attr
+ return '<SimpleLazyObject: %r>' % (repr_attr, )
# Need to pretend to be the wrapped class, for the sake of objects
that
# care about this (especially in equality tests)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24454>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/054.581b5df5b870684ac047bfe25fe8c2d1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.