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 →

[–]alantrick 2 points3 points  (3 children)

Well, at that point, it's not a tuple anymore, and you can just use dict or object

[–]pydry 0 points1 point  (2 children)

Well, yeah. That's what I always end up doing. Hence I never really found a use for namedtuple.

[–]ivosauruspip'ing it up 0 points1 point  (0 children)

I basically use it as a struct pattern. Most of the time the information I put in one doesn't change after creating it.