CPython - Internally, what is stored on the stack and heap?

前端 未结 2 622
天涯浪人
天涯浪人 2020-12-10 03:09

In C#, Value Types (eg: int, float, etc) are stored on the stack. Method parameters may also be stored on the stack as well. Most everything else, however, is stored on the

2条回答
  •  余生分开走
    2020-12-10 03:30

    Python's runtime only deals in references to objects (which all live in the heap): what goes on Python's stack (as operands and results of its bytecode operations) are always references (to values that live elsewhere).

提交回复
热议问题