News for hackers. Stuff that matters.
Re:Stop passing naked dictionaries around: Introducing DStru... by zacharyvoase on Thursday November 24, 2011 @05:52AM (#3273936)
Here's something I implemented a while ago: http://zacharyvoase.github.com/urecord/

There are benefits to using tuples over objects/dictionaries: 1) Lower memory consumption 2) Faster lookups 3) Can be used as dictionary keys, set members, anywhere a hashable (immutable) object is required.

Re:Stop passing naked dictionaries around: Introducing DStru... by pthatcherg on Saturday November 26, 2011 @02:02AM (#3279297)
That's funny. I implemented almost the exact same thing a few years ago, although mine is arguably more complete :)

https://github.com/pthatcher/pyrec

Here's my original post about it:

http://www.valuedlessons.com/2009/10/introducing-pyrec-cure-...

And here's my analysis of how much less memory it uses:

http://www.valuedlessons.com/2008/10/blog-post.html