Re: Unicode exception in 'paster shell' (repr versus __repr__)

2009-08-05 Thread Christoph Haas
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

Unicode exception in 'paster shell' (repr versus __repr__)

2009-08-04 Thread Christoph Haas
Dear list, I'm experiencing a strange encoding error when using 'paster shell' with Pylons 0.9.7. In my SQLAlchemy objects I define my own __repr__() method to an ORM-mapped class. Observe: class VirtualUser(MyOrm): def __repr__(self): return uVirtualUser (#%s): Login=%s Email=%s

Re: Unicode exception in 'paster shell' (repr versus __repr__)

2009-08-04 Thread Paweł Stradomski
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