How does python pass default parameters for function encapsulation?

for example, there is a function funcA (arg1, arg2=20)

I define a function called funcA in funcB (arg1, arg2) funcB

I hope that when funcB (arg1, arg2) is called, funcA (arg1, arg2) will be called inside the function to pass the parameters arg1 and arg2 to the function funcA.

when I call funcB (arg1), I want funcA (arg1) to be called inside the function to pass the parameter arg1 and default parameter 20 to the function funcA.

how should the declaration of funcB be written at this time?

Aug.31,2021

when passing (arg1,arg2=arg2) to funcB, calling funcA (arg1,arg2=arg2)
when passing (arg1) to funcB, calling funcA (arg1,arg2=20)


def funcA(arg1,arg2=20):
    pass
    
def funcB(arg1,arg2=None):
    kwargs = {}
    if arg2 is not None:
        kwargs['arg2'] = arg2    
    funcA(arg1,**kwargs)

add to the revised version of the building

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b42fa5-41699.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b42fa5-41699.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?