http://code.google.com/p/morphia/wiki/MongoNewsletterArticleDec2010
Are you using a mapper with python? Some of them have things like this built in.
> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
In python this is pretty easy to do yourself with your own classes/code.