Message139508
| Author |
pitrou |
| Recipients |
Arfrever, amaury.forgeotdarc, benjamin.peterson, djc, georg.brandl, grubert, pitrou, vinay.sajip |
| Date |
2011年06月30日.18:22:21 |
| SpamBayes Score |
2.6622425e-08 |
| Marked as misclassified |
No |
| Message-id |
<1309458142.65.0.160576633248.issue12291@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I think the question is: will the slowdown apply to module import, or only to explicit uses of the marshal module? If the latter, then I think we can live with it - we discourage using marshal as a general-purpose serialization scheme anyway.
As for the patch:
- why do the tests have to carry a large chunk of binary data? if some data is needed, at least it would be nice if it were kept small
- not sure either why it needs zlib and base64; just use the repr() of the bytestring
- "assertEqual = self.assertEqual" is more of a nuisance than anything else; you're making the code more complicated to read just to save a few keystrokes; same for "assertIsInstance = self.assertIsInstance"
- can you add a comment next to the fields you're adding to the marshal C struct?
- if the "r_byte" macro isn't used anymore, it should be removed, not commented out
- in r_string(), what happens if PyBytes_Check(data) is false? there should probably be a TypeError of some sort
- in r_string() again, if data is NULL after the read() call, the exception shouldn't be shadowed by an EOFError
- why do you call read(1) at the beginning? it seems to make the code more complicated for no useful purpose |
|