Message404152
| Author |
gregory.p.smith |
| Recipients |
Bruno Oliveira, Daniel Lepage, Jim Fasarakis-Hilliard, gregory.p.smith, iritkatriel, louielu, r.david.murray, serhiy.storchaka |
| Date |
2021年10月18日.01:06:31 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1634519191.65.0.994955791216.issue30570@roundup.psfhosted.org> |
| In-reply-to |
| Content |
Python metaprogramming allows type-like things to be bases, not just things that pass PyType_Check(). so being that strict isn't going to work.
The other classic way to prevent this is to track what you're recursing on to avoid a loop. i.e. Keeping a set of PyObjects that have been seen and not recursing if the value is in that. |
|