Re: Pointer variables possible?

Steven Miale (
Thu, 7 Apr 1994 12:53:05 -0500

In article <>,
Steven D. Majewski <> wrote:
>In article <>, Bill Baker <> wrote:
>>I have come upon a situation that I feel would benefit from storing pointers
>>to several items in a list type that would enable insertions at these points.
>>I don't know much about the internal workings of python and whether this
>>would be possible but with C it would only require the use of an address
>>pointer. I have looked through the python references I have but being new
>>to python I don't know if this is possible.
>Python does not have pointers, but references to mutable objects
>ARE references to the OBJECT, and not the VALUE.

Maybe what we need are Scheme-style "boxes." They provide a form
of "call-by-reference", like so:

> (set! x (box 3))
> (define make-it-four
(lambda (foo)
(set-box! foo 4)))
> (make-it-four x)
> (unbox x)


Steven Miale - | Don't blame me - 
Indiana University, Bloomington, IN  | I voted Libertarian.