NameError: name 'get_DB_configuration' is not defined
复制代码
合理的利用函数嵌套,能够提高程序的运行服从。
看下面这个例子:
[code]def factorial(input): # validation check if not isinstance(input, int): raise Exception('input must be an integer.') if input < 0: raise Exception('input must be greater or equal to 0' ) def inner_factorial(input): if input