pointer in Python
Roy Marteen
rm at no-mail.com
Wed Mar 5 13:52:28 EST 2003
On 5 Mar 2003 18:25:20 GMT
William Park <opengeometry at yahoo.ca> wrote:
> Actually, everything in Python is "pointer to something real". This is
> called "object reference" in Python. So, you can assign function to a
> variable, and that variable will be a pointer to that function, ie.
> def func(a):
> return a + 1
> print func(5)
> f = func
> print f(5)
Wow what a nice language, I didn't know that. Thank you very much.
More information about the Python-list
mailing list