Skip to content

Commit 09da0e4

Browse files
committed
Merge bitcoin#19287: contrib: Fix SyntaxWarning in Python base58 implementation
47b49a0 contrib: Fix SyntaxWarning in Python base58 implementation (Alex Willmer) Pull request description: In Python integers should be compared for equality (`i == j`), not identity (`i is j`). Recent versions of CPython 3.x emit a SyntaxWarning when they encounter this incorrect usage, e.g. ``` $ python3 base58.py base58.py:110: SyntaxWarning: "is" with a literal. Did you mean "=="? assert get_bcaddress_version('15VjRaDX9zpbA8LVnbrCAFzrVzN7ixHNsC') is 0 Tests passed ``` ACKs for top commit: MarcoFalke: ACK 47b49a0 Tree-SHA512: 9f8962025dcdfa062c0515c68a1864f5bbeb86bd0510c0ec0e413a5edb6afbfd5f41b4c0255784e53db8eaf39c68b7cfa7cc8a33a2e5214aae463fda374f8719
2 parents 3faf342 + 47b49a0 commit 09da0e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/testgen/base58.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def get_bcaddress_version(strAddress):
107107

108108
if __name__ == '__main__':
109109
# Test case (from http://gitorious.org/bitcoin/python-base58.git)
110-
assert get_bcaddress_version('15VjRaDX9zpbA8LVnbrCAFzrVzN7ixHNsC') is 0
110+
assert get_bcaddress_version('15VjRaDX9zpbA8LVnbrCAFzrVzN7ixHNsC') == 0
111111
_ohai = 'o hai'.encode('ascii')
112112
_tmp = b58encode(_ohai)
113113
assert _tmp == 'DYB3oMS'

0 commit comments

Comments
 (0)