references/pointers in Python?

Ignacio Vazquez-Abrams ignacio at
Wed Sep 12 18:28:31 CEST 2001

On Wed, 12 Sep 2001, Anton Lavrik wrote:

> Generally, I want to define a referce to an integer, or to the
> identifier, that holds it.
> Python is full of references, is it possible to define it directly? Or
> maybe there are some different ways to do it?

It's true that Python is full of references, but those are references to
instances, not types.

You can do something like the following:

class MyVal:
  def __init__(self, val):
  def set(self, val):
  def __call__(self):
    return self.value

print a()

Ignacio Vazquez-Abrams  <ignacio at>

More information about the Python-list mailing list