This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, wysek
Date 2008-07-29.11:19:46
SpamBayes Score 0.0029065083
Marked as misclassified No
Message-id <1217330389.38.0.562598560595.issue3465@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2008-07-29 11:19:49amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, wysek
2008-07-29 11:19:49amaury.forgeotdarcsetmessageid: <1217330389.38.0.562598560595.issue3465@psf.upfronthosting.co.za>
2008-07-29 11:19:48amaury.forgeotdarclinkissue3465 messages
2008-07-29 11:19:47amaury.forgeotdarccreate