#6021: RuntimeError when printing a SafeString
--------------------------------------------------+-------------------------
Reporter: Jan Rademaker <[EMAIL PROTECTED]> | Owner: nobody
Status: new | Component: Core
framework
Version: SVN | Keywords: print
recursion
Stage: Unreviewed | Has_patch: 1
--------------------------------------------------+-------------------------
!SafeString's `__str__` method does not return a string but the
!SafeString object itself. Simply removing the `__str__` method seems to
solve the problem (all tests pass).
{{{
>>> from django.newforms.util import ErrorList
>>> e = ErrorList([u'foo'])
>>> e
[u'foo']
>>> type(str(e))
<class 'django.utils.safestring.SafeString'>
>>> print e
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: print recursion
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/6021>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---