Message70386
This has nothing to do with doctest. Starting with your script, I get:
>>> a = f()
>>> b = repr(a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0105' in
position 4: ordinal not in range(128)
__repr__() is supposed to return a str object. In your case, I suggest
to use %r instead of "%s":
def __repr__(self):
return '<%s %r>' % (self.__class__.__name__, self.x) |
|
Date |
User |
Action |
Args |
2008-07-29 11:19:49 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, wysek |
2008-07-29 11:19:49 | amaury.forgeotdarc | set | messageid: <1217330389.38.0.562598560595.issue3465@psf.upfronthosting.co.za> |
2008-07-29 11:19:48 | amaury.forgeotdarc | link | issue3465 messages |
2008-07-29 11:19:47 | amaury.forgeotdarc | create | |
|