[issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard

2018-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Any progress? -- versions: +Python 3.8 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list

[issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard

2017-11-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, please move this to Python-Dev. -- ___ Python tracker ___

[issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard

2017-05-10 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: > he said, "I'm not sure if this was placed inside there due to some wild > edge-case," As a new contributor, I'll always lean on the side of me not seeing something rather than confidently stating that something is definitely wrong. I'm new, the

[issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard

2017-05-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: My point was that it isn't wise to propose PRs for code you don't fully understand (he said, "I'm not sure if this was placed inside there due to some wild edge-case,"). -- ___ Python tracker

[issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard

2017-05-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Jim doesn't propose to remove fast test, it proposes to add a test for fast path for avoiding invoking __subclasscheck__ (this is slow). This can change semantic, but isinstance() already contains such fast path. This is similar to testing "elem is seq[i]"

[issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard

2017-05-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: Will deeply grokking this code, I would say to leave it alone. The test seems reasonable and is very fast (likely free of cost on many machines). -- nosy: +georg.brandl, pitrou priority: normal -> low ___ Python

[issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard

2017-05-09 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___

[issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard

2017-05-08 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Additional question, are tests required to check this behavior? (Also, bumping) -- ___ Python tracker ___

[issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard

2017-05-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- title: Move quick test in PyObject_IsSubClass outside if PyType_CheckExact guard -> Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard type: behavior -> performance

[issue30230] Move quick test in PyObject_IsSubClass outside if PyType_CheckExact guard

2017-05-02 Thread Jim Fasarakis-Hilliard
New submission from Jim Fasarakis-Hilliard: Currently the first lines in PyObject_IsSubClass are: /* We know what type's __subclasscheck__ does. */ if (PyType_CheckExact(cls)) { /* Quick test for an exact match */ if (derived == cls) return 1; return