[pycrypto] Library design philosophy

Mads Kiilerich mads at kiilerich.com
Wed Apr 15 17:01:32 CST 2009


James A. Donald wrote, On 04/15/2009 05:47 AM:
> Dwayne C. Litzenberger wrote:
>   >  M2crypto's API is neither simple nor Pythonic,
>
> What makes PyCryto pythonic, and M2crytpo unpythonic,
> apart from the fact that M2Crypto wraps a very large
> random aggregation of stuff that was concocted over many
> years by overly large and excessively official
> committees?
>    

You could say that if it has been designed with python in mind then it 
is pythonic. That doesn't necessarily make it any better than the 
opposite, even though we must expect a bit python fanboyism here on a 
python list ;-)

The "apart" you mention could be a good reason for calling m2crypto 
"unpythonic". For a wrapper of a library one of the goals should be to 
provide an api as close to the original as possible so that existing 
examples and documentation can be used, so being called "unpythonic" 
isnt' necessarily a bad thing.

Looking at it again m2crypto isn't as bad as I remember it, and I don't 
know it well enough to give any examples of where it is bad.

Pycrypto do have the freedom to provide the best possible API and 
(AFAIK) a goal of being as simple as possible and as much in the python 
tradition as possible.

Which one is "best" is probably mostly a matter of requirements and 
preferences.

/Mads

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3435 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.dlitz.net/pipermail/pycrypto/attachments/20090416/c5777667/attachment.bin 


More information about the pycrypto mailing list