non-owning references?

Hrvoje Niksic hniksic at xemacs.org
Fri Jul 24 09:55:45 EDT 2009


Ben Finney <ben+python at benfinney.id.au> writes:

> Utpal Sarkar <doetoe at gmail.com> writes:
>
>> Is there a way I can tell a variable that the object it is pointing
>> too is not owned by it, in the sense that if it is the only reference
>> to the object it can be garbage collected?
>
> Python doesn't have “pointers”, and doesn't really have “variables”
> either, at least not how many other languages use that term.

The OP didn't use the term "pointer", but the word "pointing", which
makes sense in the context.  The term "variable" is used in the Python
language reference and elsewhere, and is quite compatible with how other
popular languages (Java, PHP, Lisp, ...) use it.  Please stop
complaining about valid terminology; it is not helpful.



More information about the Python-list mailing list