function pointer
Gerrit Muller
gerrit.muller at philips.com
Wed Sep 11 07:06:56 EDT 2002
<...snip...>
> and even better python has bound methods:
>
> >>> class a:
> def f(self, arg):
> print arg
>
> >>> a1=a()
> >>> a1.f
> <bound method a.f of <__main__.a instance at 0x813ee74>>
> >>>
>
> you can pass these functions and methods around and apply them
> as you wish. Very powerful.
>
> holger
Thank you for this hint. I did not know this. Although I don't see any
immediate applications it looks quite cool!
regards Gerrit
--
--------------------------------------------------------------------
Gerrit Muller Philips Research Laboratories Eindhoven
Building: WDC 2 - 007 Prof. Holstlaan 4
Phone: +31 40 27 45242 5656 AA Eindhoven
Fax: +31 40 27 45033 The Netherlands
mailto:gerrit.muller at philips.com
http://www.extra.research.philips.com/natlab/sysarch/index.html
More information about the Python-list
mailing list