Message153718
| Author |
valhallasw |
| Recipients |
Ronny.Pfannschmidt, RonnyPfannschmidt, alexandre.vassalotti, georg.brandl, ggenellina, gvanrossum, jcea, jdharper, loewis, pitrou, valhallasw |
| Date |
2012年02月19日.19:08:08 |
| SpamBayes Score |
8.794726e-09 |
| Marked as misclassified |
No |
| Message-id |
<1329678490.57.0.0127552207963.issue6784@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
OK, this is the pickle.py patch. A new parameter 'bytestr' has been added to both _Pickler and _Unpickler to toggle the pickle.string<=>bytes behaviour:
_Pickler:
IF protocol <= 2 AND bytestr=True
THEN bytes are stored as STRING/SHORT_BINSTRING/BINSTRING
ELSE (the old behaviour; obj for protocol <=2, else BINARY)
_Unpickler:
IF bytestr=True
THEN STRING/SHORT_BINSTRING/BINSTRING are read as bytes
ELSE they are read as str (old behaviour)
I also extracted the decoding stuff from the three string reading functions to a single one. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年02月19日 19:08:10 | valhallasw | set | recipients:
+ valhallasw, gvanrossum, loewis, georg.brandl, jcea, ggenellina, pitrou, alexandre.vassalotti, RonnyPfannschmidt, jdharper, Ronny.Pfannschmidt |
| 2012年02月19日 19:08:10 | valhallasw | set | messageid: <1329678490.57.0.0127552207963.issue6784@psf.upfronthosting.co.za> |
| 2012年02月19日 19:08:10 | valhallasw | link | issue6784 messages |
| 2012年02月19日 19:08:09 | valhallasw | create |
|