python- function basis (* arge ** kwargs)

# * ** kwargs Arge 
'' ' 
* args 
    in the parameter angles, i.e., when the role of the function of the received parameters (loose pile will be packaged into a position parameter tuples) 
    Examples: 
        DEF FUNC (* args): args = ( 2,3,4,5) 
            Pass 
        FUNC (2,3,4,5) 
    at an angle argument, i.e., when the function call parameters passed (or a list of tuples broken into, a parameter) 
    examples : 
        : DEF FUNC (* args) 
            Pass 
        FUNC (* [2,3,4,5]) == FUNC (2,3,4,5) 
        
** kwargs 
    when the angle parameter, is a function of the received parameters effect (a pile of loose packed into a dictionary keyword parameter) 
    examples: 
        DEF FUNC (** kwargs): kwargs = { 'a':. 1, 'B': 2, 'C':}. 3 
            Pass 
        FUNC (a = 1, b = 2, c = 3) 
    in the angle of the argument, that is, the function call parameters passed time (broken into a dictionary, a keyword parameter) 
    examples:  
        DEF FUNC (** kwargs):
            Pass
        func(**{'a':1,'b':2,'c':3}) == func(a=1,b=2,c=3)

'''

 

Guess you like

Origin www.cnblogs.com/wtil/p/10961179.html