Get the most out of Python dicts

I won't make any dict joke

Bite code!

@winniehell

It is #unfortunate. It would be nice if we had a fourth member to go after #parentheses, #brackets, and #braces.

I tend not to use set literals, preferring `set(sequence)`. Maybe it's because my brain insists they're broken #dicts.

Anyone experience in #parsing (not interested in filtering with regex) configuration #files? Currently I am reading config files in #Python3 line by line where each line is a full configuration command and converting that into a “path” to a value using nested #dicts. This works fine with smallish configs, but very large configs do not scale, at all. Think a jump from a minute to multiple hours. There is *no* existing code I have been able to find. I can’t change file format to something else.

@nosherwan @xblasco This article for #Python #dicts is interesting: https://tenthousandmeters.com/blog/python-behind-the-scenes-10-how-python-dictionaries-work/

For one, it reiterates the time complexity as O(1), but then you can see the graph where it doesn't follow theory when benchmarked.

The article explains why. CPU Caches.

But the underlying question is, should be considered O(1) if in practice doesn't follow it?

Python behind the scenes #10: how Python dictionaries work

Python dictionaries are an extremely important part of Python. Of course they are important because programmers use them a lot, but that's not the...