Leandro Lima <lean...@limaesilva.com.br> added the comment:

IMV, the adopted solution creates a problem of a mismatch between the signature 
and the function behavior.

I was just hit by this, as I never cared to specify digestmod trusting that 
Python defaults are usually sound choices.

I agree that changing the signature would break more code, but the choice made 
here violates the principle of least astonishment. An error that could be 
caught by a static analysis tool silently entered the code base to be provoked 
only when the function got called.

The choice to break compatibility was already made. Introducing silent bugs is 
something that I think we should avoid.

I've wrote an argument about this in a different message, and I'm not sure if I 
should repeat it here. Here's the link to it:
https://bugs.python.org/msg357551

----------
nosy: +Leandro Lima

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

Reply via email to