Gregory P. Smith <g...@krypto.org> added the comment:

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.

----------

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

Reply via email to