Raymond Hettinger added the comment:
Overall, I'm +1 on the idea and think the patch looks good. There are two
issues to look at:
1) Neither the md5 or shasum command-line tools offer control over the
blocksize. I suggest that option be dropped from the command-line API giving a
nice simplification and usability improvement.
The stdin option has issues:
$ md5
abc
0bee89b07a248e27c83fc3d5951213c1
$ python3.6 -m hashlib md5
abc
^D
^CTraceback (most recent call last):
File "/Users/raymond/cpython/Lib/runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "/Users/raymond/cpython/Lib/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/raymond/cpython/Lib/hashlib.py", line 246, in <module>
main()
File "/Users/raymond/cpython/Lib/hashlib.py", line 238, in main
data = args.file.read(args.block_size)
KeyboardInterrupt
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue26488>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com