returns an odict version of the object, based on it's attributes

def as_odict(self):
        """
        returns an odict version of the object, based on it's attributes
        """
        if hasattr(self, 'cust_odict'):
            return self.cust_odict
        if hasattr(self, 'attr_check'):
            self.attr_check()
        odc = odict()
        for attr in self.attrorder:
            odc[attr] = getattr(self, attr)
        return odc