Message196065
@Serhiy: it's a behavior change and as such not an option for a micro release. For example, the following legal code would behave differently: it would compute s = '\\u1234' instead of s = 'UTF8:\xe1\x88\xb4'.
try:
s = repr(x)
except UnicodeEncodeError:
s = 'UTF8:' + x.value.encode('utf-8')
I think I agree that a working repr() is generally better, but in this case it should point to the programmer that they should rather have __repr__() return something sensible and avoid the trick above... |
|
Date |
User |
Action |
Args |
2013-08-24 06:40:30 | arigo | set | recipients:
+ arigo, lemburg, vstinner, ezio.melotti, eric.araujo, r.david.murray, liori, Nam.Nguyen, serhiy.storchaka |
2013-08-24 06:40:30 | arigo | set | messageid: <1377326430.3.0.0375116335269.issue5876@psf.upfronthosting.co.za> |
2013-08-24 06:40:30 | arigo | link | issue5876 messages |
2013-08-24 06:40:30 | arigo | create | |
|