mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-45155 : Default arguments for int.to_bytes(length=1, byteorder=sys.byteorder) (#28265)
Add default arguments for int.to_bytes() and int.from_bytes() Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
This commit is contained in:
parent
a9757bf34d
commit
07e737d002
6 changed files with 127 additions and 65 deletions
|
@ -39,7 +39,7 @@ class CFunctionCallsErrorMessages(unittest.TestCase):
|
|||
self.assertRaisesRegex(TypeError, msg, {}.__contains__, 0, 1)
|
||||
|
||||
def test_varargs3(self):
|
||||
msg = r"^from_bytes\(\) takes exactly 2 positional arguments \(3 given\)"
|
||||
msg = r"^from_bytes\(\) takes at most 2 positional arguments \(3 given\)"
|
||||
self.assertRaisesRegex(TypeError, msg, int.from_bytes, b'a', 'little', False)
|
||||
|
||||
def test_varargs1min(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue