#12256: TypeError when calling unicode(type(Form()))
---------------------------------+------------------------------------------
          Reporter:  sethrh      |         Owner:  nobody
            Status:  new         |     Milestone:        
         Component:  Forms       |       Version:  1.1   
        Resolution:              |      Keywords:        
             Stage:  Unreviewed  |     Has_patch:  0     
        Needs_docs:  0           |   Needs_tests:  0     
Needs_better_patch:  0           |  
---------------------------------+------------------------------------------
Comment (by Alex):

 This must be a bug in certain versions of python because your code snippet
 runs fine for me:
 {{{
 >>> class X(object):
 ...     def __init__(self, x):
 ...         self.x = x
 ...     def __unicode__(self):
 ...         return unicode(self.x)
 ...
 ...

 >>> x = X(5)

 >>> unicode(x)
 [3] u'5'

 >>> unicode(type(x))
 [4] u"<class '__main__.X'>"
 }}}

 What version of CPython are you guys on?

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12256#comment:3>
Django <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=.


Reply via email to