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

Antoine Pitrou solipsis at pitrou.net
Sat May 25 15:26:58 CEST 2013


On Sat, 25 May 2013 06:23:56 -0700 Eli Bendersky <eliben at gmail.com> wrote:

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

> > Hello, > > 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. > > Regards > Personally I never used it, but it's now explicitly documented as returning a list. Not sure what's the right thing to do here, but perhaps returning an OrderedDict can eliminate the order problem?

It would still return a list.

Regards

Antoine.



More information about the Python-Dev mailing list