Message 361518 - Python tracker
Message361518
| Author | vstinner |
|---|---|
| Recipients | vstinner |
| Date | 2020-02-07.00:22:52 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1581034972.67.0.0618243524149.issue39573@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
TODO: Add Py_IS_TYPE() macro:
#define Py_IS_TYPE(ob, tp) (Py_TYPE(ob) == (tp))
For example, replace:
#define PyBool_Check(x) (Py_TYPE(x) == &PyBool_Type)
with:
#define PyBool_Check(x) Py_IS_TYPE(x, &PyBool_Type)
IMHO it makes the code more readable.
https://github.com/nascheme/cpython/commit/c156300592dc1eab234b74ed5b7cc90a020ab82b |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2020-02-07 00:22:52 | vstinner | set | recipients: + vstinner |
| 2020-02-07 00:22:52 | vstinner | set | messageid: <1581034972.67.0.0618243524149.issue39573@roundup.psfhosted.org> |
| 2020-02-07 00:22:52 | vstinner | link | issue39573 messages |
| 2020-02-07 00:22:52 | vstinner | create | |