How is this an argument against using dictionaries?
After 10 years of Python development, I do find myself using dictionaries rather than objects, in just the way that the author proscribes, but I'm finding it to be a genuine pleasure.
How is this an argument against using dictionaries?
After 10 years of Python development, I do find myself using dictionaries rather than objects, in just the way that the author proscribes, but I'm finding it to be a genuine pleasure.
Yeah, get shit done, YAGNI, and all that.
If needs wrapper, make one for repeated access types. If needs one or more bonafide objects for passing around, updating, and general good behavior, the make them as needed. Otherwise, there are 15 other little jobs that need coding, and we gotta move on.
It might be reasonable to make the assumption for some keys. In these cases a function taking the data and key as arguments and returning the value is sufficient and appropriate.
Frankly, if the code base is so littered with references to that specific data and key combination it might actually indicate a poor design.
Considering how easy it is, and how often I've had keys change on me, I have to strongly disagree.
"Frankly, if the code base is so littered with references to that specific data and key combination it might actually indicate a poor design."
That's kinda the point of the article.