[Python-Dev] subclasses() return order (original) (raw)

PJ Eby pje at telecommunity.com
Sat May 25 19:03:57 CEST 2013


On Sat, May 25, 2013 at 9:18 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:

In http://bugs.python.org/issue17936, I proposed making tpsubclasses (the internal container implementing object.subclasses) a dict. This would make the return order of subclasses completely undefined, while it is right now slightly predictable. I have never seen subclasses actually used in production code, so I'm wondering whether someone might be affected by such a change.

FWIW, when I've used subclasses, I've never depended on it having a stable or predictable order. (I find it somewhat difficult to imagine why one would do that, but of course that doesn't mean nobody has done it.)



More information about the Python-Dev mailing list