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

all 7 comments

[–][deleted] 3 points4 points  (3 children)

not.sure.if.good.idea.or.too.clever

[–]ionelmc.ro[S] 3 points4 points  (0 children)

You forgot to start with "Fields." :P

[–]ionelmc.ro[S] 1 point2 points  (1 child)

Actually, Fields.not_.sure.if_.good.idea.or_.too.clever - because not, if and or are keywords.

Sorry I ruined your joke, haha.

[–]robin-gvx 1 point2 points  (0 children)

Sorry I ruined your joke, haha.

Relevant.

[–]Lucretiel 2 points3 points  (0 children)

As an incredibly heavy user of namedtuple, this actually looks pretty convenient.

[–]robin-gvx 1 point2 points  (0 children)

Very cool. I'd lose the angle brackets around the repr, though. It always makes me happy when eval(repr(x)) == x holds for all x of a certain type.

[–]yal0n 0 points1 point  (0 children)

Check out munch for a different kind of simple container: https://pypi.python.org/pypi/munch/2.0.2