Antoine Pitrou <pit...@free.fr> added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12291>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to