Skip to content
This repository was archived by the owner on Apr 19, 2024. It is now read-only.

Commit 337b741

Browse files
committed
minor changes to comment and docstring
1 parent bca0135 commit 337b741

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

multihash.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ class Multihash(namedtuple('Multihash', 'func length digest')):
5252
>>> mhfn.func is Func.sha2_256
5353
True
5454
55-
Application-specific codes (0x00-0x0f) are accepted. Other codes raise
56-
`ValueError`:
55+
Application-specific codes (0x00-0x0f) are also accepted. Other codes
56+
raise `ValueError`:
5757
5858
>>> mhfc = Multihash(0x01, 4, b'...')
5959
>>> mhfc.func
@@ -62,12 +62,13 @@ class Multihash(namedtuple('Multihash', 'func length digest')):
6262
Traceback (most recent call last):
6363
...
6464
ValueError: ('invalid hash function code', 1234)
65+
6566
"""
6667
__slots__ = ()
6768

6869
def __new__(cls, func, length, digest):
6970
try:
70-
f = Func(func)
71+
f = Func(func) # function or function code
7172
except ValueError as ve:
7273
if _is_app_specific_func(func):
7374
f = int(func) # application-specific function code

0 commit comments

Comments
 (0)