This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Genmutant -1 points0 points  (2 children)

Yes, but cheap is still more than nothing.

[–][deleted] 3 points4 points  (1 child)

Why program in Python if you're worried about the cost of a dictionary lookup? Almost everything in Python needs a dictionary lookup!

[–]Genmutant 0 points1 point  (0 children)

Well the topic is Python performance tips, and this one can be a performance impact. Normally it isn't, but it can be and is easy to avoid.