Aviram <aviramyhas...@gmail.com> added the comment:

I agree that a developer should and would prefer the `Py_TPFLAGS_*` but when 
you visit https://docs.python.org/3/c-api/sequence.html
It seems like the best practice to determine Sequence protocol is by using this 
function, hence leading to confusion. There's no recommendation to use the new 
`Py_TPFLAGS_*`.
To have this knowledge of `Py_TPFLAGS_*` one should be very knowledgable in 
Python's C-API.
How about adding a deprecation note to `PyMapping_Check` & `PySequence_Check` 
in the documentation, suggesting the alternative path (to use 
`PyType_HasFeature`)?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46376>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to