MD5 module Pythonicity

Fredrik Lundh fredrik at pythonware.com
Sat Oct 15 02:44:04 EDT 2005


Leandro Lameiro wrote:

> What's wrong in having a function like the one I said, that would
> split files for you, feed md5.update and, when it is over, return the
> digest?

Calculating the digest sum for a file on disk, without doing anything else
with that file, is a very small subset of everything you may want to use
digests for.  Forcing every digest module to add code to cater for just
one of many use cases is most likely a waste of time.

> "Although practicality beats purity."
> "Readability counts."
> "Beautiful is better than ugly."
>
> Have I got the wrong "Pythonic" definition?

You're confusing the kitchensink approach with the modular approach.
Bloated API:s are not practical, readable, nor beautiful.  Small flexible
components that can be easily combined are.

</F>






More information about the Python-list mailing list