Paweł Stradomski schrieb: > W liście Christoph Haas z dnia wtorek 04 sierpnia 2009: >> Does anyone have an explanation why foo.__repr__() and repr(foo) makes such >> a difference here? Hints welcome. > > Shouldn't repr return plain string, not unicode one? When calling .__repr__() > directly you just call a method directly. When called by repr() some ipython > magic happens, which expects __repr__ to return a string.
Thanks - you saved my day. I'm now using .encode('utf-8') before I return the string and now everything works. Cheers Christoph
signature.asc
Description: OpenPGP digital signature