[issue30948] Docs for __subclasses__(): Add hint that Python imports are lazy

R. David Murray report at bugs.python.org
Mon Jul 17 11:17:57 EDT 2017


R. David Murray added the comment:

Thanks for the suggestion, but I don't think so.

Python imports are not lazy.  They are ordered.  Python is an *interpreted* language, so __subclasses__ is only going to hold those subclasses whose class definitions have been executed. This is fundamental to how the language works, and does not warrant a special note here.  Note that the entry already includes something that should give a strong hint about this even if you hadn't previously thought about it: the statement that it only includes subclasses that are "still alive".  This implies they aren't in the list until they become alive.

----------
nosy: +r.david.murray
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30948>
_______________________________________


More information about the Python-bugs-list mailing list