Message5783

Author pjenvey
Recipients mcieslik, pjenvey
Date 2010-05-26.18:56:57
SpamBayes Score 0.07481854
Marked as misclassified No
Message-id <1274900219.03.0.432178815756.issue1613@psf.upfronthosting.co.za>
In-reply-to
Content
My fault, your assumption was correct, 2to3 doesn't convert str to bytes. Maintaing 2.5 compatibility looks pretty painful, you could do something like tagging your bytes with a separate function that would encode them under 3. This obviously sucks but I don't see many other options

if sys.version_info > (3, 0):
    def b(s):
        return s.encode('latin-1')
else:
    b = str

b('some bytes')
History
Date User Action Args
2010-05-26 18:56:59pjenveysetmessageid: <1274900219.03.0.432178815756.issue1613@psf.upfronthosting.co.za>
2010-05-26 18:56:59pjenveysetrecipients: + pjenvey, mcieslik
2010-05-26 18:56:58pjenveylinkissue1613 messages
2010-05-26 18:56:58pjenveycreate