Message372079
The PEP 384 part was fixed by:
commit 04f0bbfbedf8d2bb69b012f853de6648b1a9f27f
Author: Dino Viehland <dinoviehland@fb.com>
Date: Fri Sep 13 11:12:27 2019 +0100
bpo-38075: Port _randommodule.c to PEP-384 (GH-15798)
- Migrate `Random_Type` to `PyType_FromSpec`
- To simulate an old use of `PyLong_Type.tp_as_number->nb_absolute`, I added
code to the module init function to stash `int.__abs__` for later
use. Ideally we'd use `PyType_GetSlot()` instead, but it doesn't currently
work for static types in CPython, and implementing it just for this case
doesn't seem worth it.
- Do exact check for long and dispatch to PyNumber_Absolute, use vector call when not exact. |
|
Date |
User |
Action |
Args |
2020-06-22 09:37:08 | vstinner | set | recipients:
+ vstinner, loewis, rhettinger, mark.dickinson, Robin.Schreiber |
2020-06-22 09:37:08 | vstinner | set | messageid: <1592818628.02.0.800618309789.issue15668@roundup.psfhosted.org> |
2020-06-22 09:37:08 | vstinner | link | issue15668 messages |
2020-06-22 09:37:07 | vstinner | create | |
|