Python memory model for this program

后端 未结 3 890
名媛妹妹
名媛妹妹 2020-12-06 15:31

My query is on the below program with respect to symbols that are storing values and functions, when ran on http://pythontutor.com/.

3条回答
  •  时光说笑
    2020-12-06 16:16

    1. Dictionaries on dictionaries. Dictionaries are the number 1 most important structure in Python.

    2. It is the key of an entry in the current scope's dictionary. The value is the object 2.

    3. It is not that functions are objects, but that some objects are functions. Or numbers. Or dictionaries.

    4. It is the key of an entry in the current scope's dictionary. The value is sub.

提交回复
热议问题