This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sbt
Recipients alexandre.vassalotti, irmen, meador.inge, pitrou, sbt
Date 2011-12-13.01:54:46
SpamBayes Score 3.95855e-11
Marked as misclassified No
Message-id <>
> 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.')
>>> type(_)
<type 'str'>
Date User Action Args
2011-12-13 01:54:48sbtsetrecipients: + sbt, irmen, pitrou, alexandre.vassalotti, meador.inge
2011-12-13 01:54:48sbtsetmessageid: <>
2011-12-13 01:54:48sbtlinkissue13505 messages
2011-12-13 01:54:46sbtcreate