Skip to content

Commit d1e02a4

Browse files
committed
Prefix py2_(x|lx|b2x|b2lx) with _
Internal stuff
1 parent b0f545c commit d1e02a4

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

bitcoin/core/__init__.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,23 @@
3131
def MoneyRange(nValue):
3232
return 0 <= nValue <= MAX_MONEY
3333

34-
def py2_x(h):
34+
def _py2_x(h):
3535
"""Convert a hex string to bytes"""
3636
return binascii.unhexlify(h)
3737

3838
def x(h):
3939
"""Convert a hex string to bytes"""
4040
return binascii.unhexlify(h.encode('utf8'))
4141

42-
def py2_b2x(b):
42+
def _py2_b2x(b):
4343
"""Convert bytes to a hex string"""
4444
return binascii.hexlify(b)
4545

4646
def b2x(b):
4747
"""Convert bytes to a hex string"""
4848
return binascii.hexlify(b).decode('utf8')
4949

50-
def py2_lx(h):
50+
def _py2_lx(h):
5151
"""Convert a little-endian hex string to bytes
5252
5353
Lets you write uint256's and uint160's the way the Satoshi codebase shows
@@ -63,7 +63,7 @@ def lx(h):
6363
"""
6464
return binascii.unhexlify(h.encode('utf8'))[::-1]
6565

66-
def py2_b2lx(b):
66+
def _py2_b2lx(b):
6767
"""Convert bytes to a little-endian hex string
6868
6969
Lets you show uint256's and uint160's the way the Satoshi codebase shows
@@ -80,15 +80,15 @@ def b2lx(b):
8080
return binascii.hexlify(b[::-1]).decode('utf8')
8181

8282
if not (sys.version > '3'):
83-
x = py2_x
84-
b2x = py2_b2x
85-
lx = py2_lx
86-
b2lx = py2_b2lx
87-
88-
del py2_x
89-
del py2_b2x
90-
del py2_lx
91-
del py2_b2lx
83+
x = _py2_x
84+
b2x = _py2_b2x
85+
lx = _py2_lx
86+
b2lx = _py2_b2lx
87+
88+
del _py2_x
89+
del _py2_b2x
90+
del _py2_lx
91+
del _py2_b2lx
9292

9393

9494
def str_money_value(value):

0 commit comments

Comments
 (0)