pytoolz/toolz — pull request #193 by berrytj (2014-06-14 22:56:48+00:00)
Title: objtoolz

This pull request adds three functions (assoc_obj, update_in_obj, get_in_obj)
that operate on objects analogously to how their dicttoolz counterparts
operate on dictionaries. I'm not actually requesting that you merge this in
-- it's totally reasonable that you might want to exclude objects from Toolz's
supported operands -- but objects are a reality in the codebases that I work
on, so I built this for myself and am posting it here in case you
find it useful.

Notes:
-- I may convert additional dicttoolz functions in the future; I haven't deeply
considered which others would be useful/applicable.
-- The only major functionality difference from the dicttoolz analogs is that
update_in_obj won't create nested objects for you, since it wouldn't be clear
what type of object to create.
-- Given that nested objects and dictionaries/lists can be mixed, I may write a
get_in analog that can leverage both getattr and getitem.