(self, parameters)
Uses a list with argument clinic information (see PEP 436).
Uses a list with argument clinic information (see PEP 436).
Uses a list with argument clinic information ( see PEP 436 ) .
def eval_argument_clinic(self, parameters):
        """Uses a list with argument clinic information (see PEP 436)."""
        iterator = self.unpack()
        for i, (name, optional, allow_kwargs) in enumerate(parameters):
            key, argument = next(iterator, (None, None))
            if key is not None:
                raise NotImplementedError
            if argument is None and not optional:
                debug.warning('TypeError: %s expected at least %s arguments, got %s',
                              name, len(parameters), i)
                raise ValueError
            values = NO_CONTEXTS if argument is None else argument.infer()

            if not values and not optional:
                # For the stdlib we always want values. If we don't get them,
                # that's ok, maybe something is too hard to resolve, however,
                # we will not proceed with the evaluation of that function.
                debug.warning('argument_clinic "%s" not resolvable.', name)
                raise ValueError
            yield values
def eval_argument_clinic ( self , parameters ) : iterator = self . unpack ( ) for i , ( name , optional , allow_kwargs ) in enumerate ( parameters ) : key , argument = next ( iterator , ( None , None ) ) if key is not None : raise NotImplementedError if argument is None and not optional : debug . warning ( 'TypeError: %s expected at least %s arguments, got %s' , name , len ( parameters ) , i ) raise ValueError values = NO_CONTEXTS if argument is None else argument . infer ( ) if not values and not optional : # For the stdlib we always want values. If we don't get them, # that's ok, maybe something is too hard to resolve, however, # we will not proceed with the evaluation of that function. debug . warning ( 'argument_clinic "%s" not resolvable.' , name ) raise ValueError yield values