But today the validation function parameter passing mechanism, found the same two Python tuple memory address sometimes, sometimes not, don't know is what reason, don't know the great spirit here can you give an explanation.
The first picture is in interactive mode, the second picture is to write the text after the execution of.
[code=python] [code=python]
CodePudding user response:
Show incomplete problem!Figure 1 a program you have as a result, no problem,
Do you have as a result, figure 2 light application specific how to write?
CodePudding user response:
Tried really have the building Lord said phenomenon, the individual is understanding and retaining the source file is compiled into byte code, and then execute bytecode made special treatment for a tuple, in the process of element are constants and immutable type, and use the same the same memory, interactive mode without memory storage of the tuple without this processing,CodePudding user response: