Message390614
> I'd also prefer a Py_IsNotNone() because it's more explicit than !Py_IsNone()
I would prefer keep the C API small. I don't think that we need to duplicate all functions testing for something. We provide PyTuple_Check(obj) but we don't provide PyTuple_NotCheck(obj) for example.
IMO !Py_IsNone(obj) makes perfectly sense in Python.
Also, "x == Py_None" is more common than "x != Py_None". |
|
Date |
User |
Action |
Args |
2021-04-09 12:50:46 | vstinner | set | recipients:
+ vstinner, tim.peters, rhettinger, mark.dickinson, Carl.Friedrich.Bolz, Mark.Shannon, pablogsal, shihai1991, erlendaasland |
2021-04-09 12:50:46 | vstinner | set | messageid: <1617972646.79.0.421010323007.issue43753@roundup.psfhosted.org> |
2021-04-09 12:50:46 | vstinner | link | issue43753 messages |
2021-04-09 12:50:46 | vstinner | create | |
|