Message149371
> Which is fine. 'bytes' and byte literals were not introduced until
> 2.6 [1,2]. So *any* solution we come
> up with is for >= 2.6.
In 2.6 and 2.7, bytes is just an alias for str. In all 2.x versions with codecs.encode, the result will be str. (Although I haven't actually tested earlier than 2.6.)
Python 2.6.5 (r265:79063, Jun 12 2010, 17:07:01)
[GCC 4.3.4 20090804 (release) 1] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pickle
>>> pickle.loads('\x80\x02c_codecs\nencode\nq\x00X\x03\x00\x00\x00abcq\x01X\x06\x00\x00\x00latin1q\x02\x86q\x03Rq\x04.')
'abc'
>>> type(_)
<type 'str'> |
|
Date |
User |
Action |
Args |
2011-12-13 01:54:48 | sbt | set | recipients:
+ sbt, irmen, pitrou, alexandre.vassalotti, meador.inge |
2011-12-13 01:54:48 | sbt | set | messageid: <1323741288.59.0.177639965259.issue13505@psf.upfronthosting.co.za> |
2011-12-13 01:54:48 | sbt | link | issue13505 messages |
2011-12-13 01:54:46 | sbt | create | |
|