@classmethod
    def _encode_inner(cls, params):
        # special case value encoding
        ENCODERS = {
            list: cls.encode_list,
            dict: cls.encode_dict,
            datetime.datetime: cls.encode_datetime,
        }
        if six.PY2:
            ENCODERS[types.NoneType] = cls.encode_none
        if six.PY3:
            ENCODERS[type(None)] = cls.encode_none

        out = []
        for key, value in six.iteritems(params):
            key = cls._utf8(key)
            try:
                encoder = ENCODERS[value.__class__]
                encoder(out, key, value)
            except __HOLE__:
                # don't need special encoding
                try:
                    value = six.text_type(value)
                except:
                    pass

                out.append((key, value))
        return out
dataset/ETHPy150Open EasyPost/easypost-python/easypost/__init__.py/Requestor._encode_inner