[PATCH] D93115: LNT: Sort testsuites ascendingly
Tamar Christina via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 11 07:08:21 PST 2020
tnfchris added inline comments.
================
Comment at: lnt/server/db/v4db.py:59
+ # Order testuites alphabetically to get groupings
+ self.testsuite = dict (sorted (self.testsuite.items()))
----------------
thopre wrote:
> thopre wrote:
> > tnfchris wrote:
> > > thopre wrote:
> > > > Shouldn't you use an OrderedDict instead of dict to guarantee the ordering will be the same as when inserted?
> > > From what I understand, in Python 3, dict is guaranteed to keep order during insertion https://mail.python.org/pipermail/python-dev/2017-December/151283.html
> > Ah yes indeed, https://docs.python.org/3/library/stdtypes.html#dict has:
> >
> >
> > > Changed in version 3.7: Dictionary order is guaranteed to be insertion order. This behavior was an implementation detail of CPython from 3.6.
> >
> >
> Wait, we currently only require Python 3.6 or later because that's what lots of distribution provide. Could you make it use OrderedDict instead?
> Wait, we currently only require Python 3.6 or later because that's what lots of distribution provide. Could you make it use OrderedDict instead?
Sure, but I don't think it matters much though.. This isn't a correctness thing but just a way to attempt to provide some structure. Regardless of the order here other functions can change this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93115/new/
https://reviews.llvm.org/D93115
More information about the llvm-commits
mailing list