Can global variable be passed into Python function?

Gregory Ewing greg.ewing at
Mon Feb 24 09:07:42 CET 2014

Steven D'Aprano wrote:
> Yes, Pascal has pointers as a first-class data type. Syntax is similar to 
> C, ^x is a pointer to x, p^ dereferences the pointer p.

Actually, the prefix ^ is only used for declaring
pointer *types*. Standard Pascal has no way of getting
a pointer to an arbitrary variable; the only way to
get a pointer is new(p) (which is the equivalent of
p = malloc(sizeof(*p))).


More information about the Python-list mailing list