[issue30963] xxlimited.c XxoObject_Check should be XxoObject_CheckExact

2020-12-31 Thread hai shi
hai shi added the comment: >The Check code is now commented out, and the issue of type checking is >mentioned in PEP 630. Got it, thanks for your supplement :) -- ___ Python tracker

[issue30963] xxlimited.c XxoObject_Check should be XxoObject_CheckExact

2020-12-31 Thread Petr Viktorin
Petr Viktorin added the comment: The Check code is now commented out, and the issue of type checking is mentioned in PEP 630. (The xxlimited_35 module still contains XxoObject_Check, among other historical code.) -- resolution: -> postponed stage: needs patch -> resolved status:

[issue30963] xxlimited.c XxoObject_Check should be XxoObject_CheckExact

2020-12-28 Thread hai shi
hai shi added the comment: > #define XxoObject_CheckExact(v) (Py_TYPE(v) == _Type) `#define Xxo_CheckExact(obj) Py_IS_TYPE(obj, _Type)` would be better to hide details now. > #define XxoObject_Check(v) PyObject_TypeCheck(v, _Type) +1 I think the annotation will worth to be updaetd.

[issue30963] xxlimited.c XxoObject_Check should be XxoObject_CheckExact

2017-07-18 Thread Jim Jewett
New submission from Jim Jewett: 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