注册函数.

        Parameters:
            name (Optional[str]): - 将函数注册到的名字,如果为None,name就用其原来的名字
327529
def register_function(self, name: Optional[str]=None):
        
        def wrap(function: Callable)->Any:
            nonlocal name
            if name is None:
                name = function.__name__
            self.funcs[name] = function
            return function
        return wrap
65232
def named(self, name):
        ''''''
        name = self.serialize(name)
        return self.get_by('name', name)
550988
def get_option(self, name):
        
        self.__validate_option_name(name)
        return self.__options.get(name, None)
871813
def param(self, name, default=None):
        ''''''
        if not name in self.params:
            return default
        return self.params[name]
778572
def name(self):
        
        name = self._element.name_val
        if name is None:
            return None
        return BabelFish.internal2ui(name)
1044717
def name(self, name):
        
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")
        if name is not None and len(name) > 200:
            raise ValueError("Invalid value for `name`, length must be less than or equal to `200`")

        self._name = name
897002
def getParam(self, paramName):
        
        param = getattr(self, paramName)
        if isinstance(param, Param):
            return param
        else:
            raise ValueError("Cannot find param with name %s." % paramName)
655792
def get_name_arg(argd, *argnames, default=None):
    
    val = None
    for argname in argnames:
        if argd[argname]:
            val = argd[argname].lower().strip()
            break
    return val if val else default
375537
def get_one_optional(self, name):
        
        locator = self._locate(name)
        return self._references.get_one_optional(locator) if locator != None else None
509056
def get_parameter(self, name):
        
        i = self.get_parameter_names(include_frozen=True).index(name)
        return self.get_parameter_vector(include_frozen=True)[i]
334640
def get_name(self, name, objid):
        '''
        
        '''
        if type(name) is tuple:
            return name

        ns = self.nspname
        n = name or self.pname or ('E' + objid)
        return ns,n
1003828
def name(self) -> Optional[str]:
        

        _, params = parse_content_disposition(
            self.headers.get(CONTENT_DISPOSITION))
        return content_disposition_filename(params, 'name')
782778
def get_argument(self, name):
        """"""
        val = self.arguments.get(name)
        if val:
            return val[0]
        return None
580690
def a(value):
    
    name = getattr(value, 'name', value)
    return some(lambda t: t == value).named(u'(a "%s")' % (name,))
1329385
def name_without_zeroes(name):
    
    first_zero = name.find(b'\0')

    if first_zero == -1:
        return name
    else:
        return str(name[:first_zero])
380972
public Optional<String> getAlias(final String name) {
        if (containStar) {
            return Optional.absent();
        }
        String rawName = SQLUtil.getExactlyValue(name);
        for (SelectItem each : items) {
            if (SQLUtil.getExactlyExpression(rawName).equalsIgnoreCase(SQLUtil.getExactlyExpression(SQLUtil.getExactlyValue(each.getExpression())))) {
                return each.getAlias();
            }
            if (rawName.equalsIgnoreCase(each.getAlias().orNull())) {
                return Optional.of(rawName);
            }
        }
        return Optional.absent();
    }
175659
def with_name(self, name):
        """"""
        if not self.name:
            raise ValueError("%r has an empty name" % (self,))
        return self._from_parsed_parts(self._drv, self._root,
                                       self._parts[:-1] + [name])