MD5 module Pythonicity

Leandro Lameiro lameiro at gmail.com
Sat Oct 15 03:22:31 EDT 2005


Hi Fredrik (and other too). First of all, thanks for taking your time
to help me.

On 10/15/05, Fredrik Lundh <fredrik at pythonware.com> wrote:
> 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.
>

Seems that we are disagreeing about frequency of use of file hashes
compared to frequency of uses of all kind of digest.
I don't have a way to support my point of view, as it was just a
personal impression.
Maybe I've got a distorted impression about the importance of this. As
I'm not an experienced programmer, I'd probably trust more in your
impressions than mine. :)

> > "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.

Well, right. But for a very common thing (maybe not this one), is it
OK to add some functionality to the Standard Library?
I mean, if we all agreed that it is a common thing, a patch for this
would probably be accepted, or even if it was an agreed common thing,
it would still be a bad idea because it would bloat the API?

Thanks and Regards
Leandro Lameiro

>
> </F>
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>



More information about the Python-list mailing list