Kent Johnson wrote:
Could this be handled with a try / except in unicode()? Something like
this:
Perhaps. However, this would cause a significant performance hit, and
possbibly undesired side effects. So due process would require that the
interface of __unicode__ first, and then change the actual calls to it.
One thing that hasn't been pointed out in this thread yet is that the OP
could just define __unicode__() on his class to do what he wants...
Actually, Steven Bethard wrote "You should either define __unicode__ or
call str() manually on the object."
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list