Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • apart from the fact that small integers are 'interned', so they will never be garbage collected. Commented Dec 31, 2020 at 8:30
  • What you're calling 'names' are commonly called variables (including by Mr Rossum) across programming languages. They may have different scope and lifetime and more relaxed typing rules in dynamic languages like Python (Lisp, JavaScript, Lua, etc.) As @TonySuffolk66 points out, they aren't actually always references to GC'able objects - and a C/C++ variable may hold a reference to an object, and as in Python, such an object may be shared between variables, and GC'd when there are no more references to it. Commented Feb 22, 2022 at 19:36
  • You are correct that Guido talks about variables, but when you look at any documentation that looks at the internal semantics you will see that the details talk about names bound to objects. It is a minor distinction for most developers but an important one when you start talking about the impact on objects of operations. Commented Feb 28, 2022 at 7:43