Skip to content

Commit aaf8f23

Browse files
committed
Address Stan's review
1 parent dc6aad9 commit aaf8f23

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

‎Lib/test/test_bytes.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ def test_fromhex(self):
523523
self.assertEqual(self.type2test.fromhex(a), b'\x12\x34')
524524

525525
a = array.array('B', list(b'12345')) # Missing second digit
526-
with self.assertRaises(ValueError) as cm:
526+
with self.assertRaises(ValueError):
527527
self.type2test.fromhex(a)
528528

529529
def test_hex(self):

‎Objects/bytesobject.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2705,7 +2705,6 @@ _PyBytes_FromHex(PyObject *string, int use_bytearray)
27052705

27062706
bot = _PyLong_DigitValue[*str];
27072707
if (bot >= 16) {
2708-
/* Check if we had a second digit */
27092708
invalid_char = str - start;
27102709
goto error;
27112710
}

0 commit comments

Comments
 (0)