Author arigo
Recipients Nam.Nguyen, arigo, eric.araujo, ezio.melotti, lemburg, liori, r.david.murray, serhiy.storchaka, vstinner
Date 2013-08-24.06:40:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1377326430.3.0.0375116335269.issue5876@psf.upfronthosting.co.za>
In-reply-to
Content
@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...
History
Date User Action Args
2013-08-24 06:40:30arigosetrecipients: + arigo, lemburg, vstinner, ezio.melotti, eric.araujo, r.david.murray, liori, Nam.Nguyen, serhiy.storchaka
2013-08-24 06:40:30arigosetmessageid: <1377326430.3.0.0375116335269.issue5876@psf.upfronthosting.co.za>
2013-08-24 06:40:30arigolinkissue5876 messages
2013-08-24 06:40:30arigocreate