Serhiy Storchaka added the comment:

Explicit is better than implicit.

It is easy to add ".encode()" in the user code if it needs this.  Adding this 
feature has non-zero (and actually not a small) cost. Since update() is not 
just a method, but a part of a protocol, you need to update all 
implementations. On other hand, raising an error on string argument can help to 
catch an error if a string unexpectedly occurred instead of a bytes object.

----------
nosy: +christian.heimes, gregory.p.smith, serhiy.storchaka
versions: +Python 3.7 -Python 3.6

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

Reply via email to