def _ext_attr_to_partial(self, name, kwarg_key):
        """ Convert a string like '233' or 'aliceblue' into partial for
            self.chained.
        """
        try:
            intval = int(name)
        except ValueError:
            # Try as an extended name_data name.
            info = name_data.get(name, None)
            if info is None:
                # Not an int value or name_data name.
                return None
            kws = {kwarg_key: info['code']}
            return partial(self.chained, **kws)
        # Integer str passed, use the int value.
        kws = {kwarg_key: intval}
        return partial(self.chained, **kws)
def _ext_attr_to_partial ( self , name , kwarg_key ) : try : intval = int ( name ) except ValueError : info = name_data . get ( name , None ) if info is None : return None kws = { kwarg_key : info [ 'code' ] } return partial ( self . chained , ** kws ) kws = { kwarg_key : intval } return partial ( self . chained , ** kws )
Convert a string like '233' or 'aliceblue' into partial for
            self.chained.