[ create a new paste ] login | about

Link: http://codepad.org/oHXp3hnh    [ raw code | output | fork ]

Python, pasted on May 27:
1
2
3
4
5
6
class Foo(object):
 def __unicode__(self):
  return str('Hallo')

unicode(Foo())
unicode(Foo(), errors='replace')


Output:
1
2
3
4
Traceback (most recent call last):
  Line 6, in <module>
    unicode(Foo(), errors='replace')
TypeError: coercing to Unicode: need string or buffer, Foo found


Create a new paste based on this one


Comments: