Commit 011179a
```pycon
>>> (0).to_bytes(0, 'big', signed=True)
b''
>>> (-1).to_bytes(0, 'big', signed=True) # was b''
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
(-1).to_bytes(0, 'big', signed=True)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
OverflowError: int too big to convert
```
Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent a1707e4 commit 011179a
File tree
3 files changed
+10
-3
lines changed- Lib/test
- Misc/NEWS.d/next/Core_and_Builtins
- Objects
3 files changed
+10
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1374 | 1374 | | |
1375 | 1375 | | |
1376 | 1376 | | |
1377 | | - | |
1378 | 1377 | | |
1379 | | - | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
1380 | 1382 | | |
1381 | 1383 | | |
1382 | 1384 | | |
| 1385 | + | |
1383 | 1386 | | |
1384 | 1387 | | |
1385 | 1388 | | |
1386 | 1389 | | |
1387 | 1390 | | |
| 1391 | + | |
| 1392 | + | |
1388 | 1393 | | |
1389 | 1394 | | |
1390 | 1395 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1209 | 1209 | | |
1210 | 1210 | | |
1211 | 1211 | | |
1212 | | - | |
| 1212 | + | |
1213 | 1213 | | |
1214 | 1214 | | |
1215 | 1215 | | |
| |||
0 commit comments