The Dictionary Object: Part 2
摘要
In the previous chapter, we explored how to create dictionary objects. However, as a dictionary’s dk_indices array becomes increasingly filled, the frequency of collisions rises, leading to a decline in performance. To address this, Python automatically expands the dictionary’s capacity when it’s nearly full. As end users, we typically do not need to worry about these details—but how is this accomplished?