How to do * and & C-lang. operations in Python?

Toni Gaya gaya at
Thu Sep 20 18:46:58 CEST 2001

I have a variable defined on one module, and want to use _exactly_ the
same variable in other module. Example:

	a = 1

module 2:
	import module1
	a = module1.a
	Now, I have module1.a value in a, not a reference to module1.a in a
Assignaments are done by 'value', not by 'reference'. Function calls
are done by 'reference'. How to do assignaments by reference?. In C
language, I can do:
c = &d
*c = 3
and now, c and d values are 3. (two pointers that point to same value


Another question:

	import module2

	If I do: "python module1", How to call a function from module1, from
here (module2)?

Thank you.

More information about the Python-list mailing list