homepage

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月12日.21:45:12
SpamBayes Score 1.0655731e-08
Marked as misclassified No
Message-id <1323726313.79.0.507527587076.issue13505@psf.upfronthosting.co.za>
In-reply-to
Content
I now realise latin_1_encode won't work because it returns a pair (bytes_obj, length).
I have done a patch using _codecs.encode instead -- the pickles turn out to be exactly the same size anyway.
>>> pickletools.dis(pickle.dumps(b"abc", 2))
 0: \x80 PROTO 2
 2: c GLOBAL '_codecs encode'
 18: q BINPUT 0
 20: X BINUNICODE 'abc'
 28: q BINPUT 1
 30: X BINUNICODE 'latin1'
 41: q BINPUT 2
 43: \x86 TUPLE2
 44: q BINPUT 3
 46: R REDUCE
 47: q BINPUT 4
 49: . STOP
History
Date User Action Args
2011年12月12日 21:45:13sbtsetrecipients: + sbt, irmen, pitrou, alexandre.vassalotti, meador.inge
2011年12月12日 21:45:13sbtsetmessageid: <1323726313.79.0.507527587076.issue13505@psf.upfronthosting.co.za>
2011年12月12日 21:45:13sbtlinkissue13505 messages
2011年12月12日 21:45:13sbtcreate

AltStyle によって変換されたページ (->オリジナル) /