simont |
Thu 2013-03-14 16:00 |
In this case, the context came from me rather than the API, as it were. As closely as I can reconstruct the thought process that led to the misunderstanding, I started by thinking "What I really want here is a thing just like a Python dictionary except that items() and keys() and viewitems() and so forth all reliably return the elements in sorted order", and then I vaguely recalled that there was a thing called collections.OrderedDict, and I assumed that must be the right thing because at that moment it hadn't occurred to me that it might mean anything else. And then I coded for days based on that assumption before getting to the point where the misunderstanding actually caused a problem (although, with hindsight, evidence of it had been visible for a while). |
|