On Tue, Sep 10, 2002 at 12:57:53PM -0400, Casey Duncan wrote:
Is there any reason to expose the encoded binary to the application at all? Why not just have the xmlrpc module decode the incoming data and just pass it along in a string or StringIO object automatically?
That's fine with me. *I* don't have any need for the encoded version, but I can imagine someone might. If there's no reason to protect it, my tendancy is to make it available. My bigger concern was that the current class does not define what data is stored in its "data". It could be either encoded or decoded. It's up to the initializer to remember what was put in it. When it's Zope doing the initialization and a user trying to use the object, that's not good.
Perhaps the latter would be better so that the decode could wait until read was actually called, thereby saving server cpu cycles if the binary is never read for some reason (like a validation error or other exception).
Yup, that's what I was thinking also. It can always be deliberately made into a string. I can imagine this is also a more efficient way of running it through manage_addFile. --kyler