Below is the eval () method of syntax:
The eval (expression [globals [, locals]])
Parameter
Expression: expression,
Globals: variable scope, the global namespace, if provided, must be a dictionary object,
Locals: variable scope, the local namespace, if provided, can be any object mapping,
1. What does it really mean for the parameters of the [] ah, why a nested one, I want to use it, how should the incoming parameters, and the number of parameters,
2. Globals and locals don't look the same, why globas must be a dictionary, and locals can be any object mapping,
CodePudding user response:
[] there is an optional parameter, beginners, can be ignored, as this parameter does not exist to go,