bpo-35992: Use PySequence_GetItem only if sq_item is not NULL by ilevkivskyi · Pull Request #11857 · python/cpython
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
Feb 17, 2019…GH-11857) Not using `__class_getitem__()` fallback if there is a non-subcriptable metaclass was caused by a certain asymmetry between how `PySequenceMethods` and `PyMappingMethods` are used in `PyObject_GetItem`. This PR removes this asymmetry. No tests failed, so I assume it was not intentional. (cherry picked from commit ac28147) Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
miss-islington added a commit that referenced this pull request
Feb 17, 2019Not using `__class_getitem__()` fallback if there is a non-subcriptable metaclass was caused by a certain asymmetry between how `PySequenceMethods` and `PyMappingMethods` are used in `PyObject_GetItem`. This PR removes this asymmetry. No tests failed, so I assume it was not intentional. (cherry picked from commit ac28147) Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters