Message298617
https://github.com/python/cpython/blob/master/Modules/xxlimited.c#L28
#define XxoObject_Check(v) (Py_TYPE(v) == Xxo_Type)
assumes that the type cannot be subclassed, but does not say so. Since this is demo code, it would be better to use something like decimal:
#define PyDec_CheckExact(v) (Py_TYPE(v) == &PyDec_Type)
#define PyDec_Check(v) PyObject_TypeCheck(v, &PyDec_Type)
I *believe* (but haven't verified) that would be:
#define XxoObject_CheckExact(v) (Py_TYPE(v) == &Xxo_Type)
#define XxoObject_Check(v) PyObject_TypeCheck(v, &Xxo_Type) |
|
Date |
User |
Action |
Args |
2017-07-18 21:17:58 | Jim.Jewett | set | recipients:
+ Jim.Jewett |
2017-07-18 21:17:58 | Jim.Jewett | set | messageid: <1500412678.84.0.816991478409.issue30963@psf.upfronthosting.co.za> |
2017-07-18 21:17:58 | Jim.Jewett | link | issue30963 messages |
2017-07-18 21:17:58 | Jim.Jewett | create | |
|