unicode bit me
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Sat May 9 12:08:37 EDT 2009
On Sat, 09 May 2009 08:37:59 -0700, anuraguniyal at yahoo.com wrote:
> Sorry being unclear again, hmm I am becoming an expert in it.
>
> I pasted that code as continuation of my old code at start i.e
> class A(object):
> def __unicode__(self):
> return u"©au"
>
> def __repr__(self):
> return unicode(self).encode("utf-8")
> __str__ = __repr__
>
> doesn't work means throws unicode error my question
What unicode error?
Stop asking us to GUESS what the error is, and please copy and paste the
ENTIRE TRACEBACK that you get. When you ask for free help, make it easy
for the people trying to help you. If you expect them to copy and paste
your code and run it just to answer the smallest questions, most of them
won't bother.
--
Steven
More information about the Python-list
mailing list