On Fri, 10 Jul 2020 at 14:26, Stestagg <stestagg@gmail.com> wrote:
All valid points, I'd recommend catching up on the entire thread, it'll be a lot quicker than re-iterating them here.
I have been reading the thread (admittedly skimming). I've seen nothing yet to suggest that there's a useful change to Python in here.
The highly condensed tl;dr version is that list(d.items())[n] is sometimes the fastest option, but sometimes not, it's not always faster (sometimes many thousands of times slowe) nor the most readable version, but is more readable than the next(iter(dict.keys()) alternative that's been mooted.
I don't dispute any of that (except maybe the readability comment, which is subjective). But that's still just saying there are different ways *in current Python* to do this, with different performance characteristics. I guess if that's all you were saying, then I can just respond "yes". Paul