(self, obj)
return self.save_reduce(operator.itemgetter, items)
itemgetter serializer (needed for namedtuple support)
itemgetter serializer (needed for namedtuple support)
itemgetter serializer ( needed for namedtuple support )
def save_itemgetter(self, obj):
        """itemgetter serializer (needed for namedtuple support)"""

        class Dummy:
            def __getitem__(self, item):
                return item

        items = obj(Dummy())
        if not isinstance(items, tuple):
            items = (items,)
        return self.save_reduce(operator.itemgetter, items)
def save_itemgetter ( self , obj ) : class Dummy : def __getitem__ ( self , item ) : return item items = obj ( Dummy ( ) ) if not isinstance ( items , tuple ) : items = ( items , ) return self . save_reduce ( operator . itemgetter , items )