equivalent to C pointer

Ian Kelly ian.g.kelly at gmail.com
Thu Apr 18 14:25:40 EDT 2013


On Thu, Apr 18, 2013 at 11:50 AM, abdelkader belahcene
<abelahcene at gmail.com> wrote:
> Thanks for answer,
> but with C  we can compile the trapeze function and put it in librairy,
> If we try to save the trapeze alone in  package to import it later,  I
> think, I am not sure
> it will be refused because F1 and sin are not define !!!     this is the
> power of the C pointers !!!
> the link is dynamic

The Python equivalent of a dynamically linked library is a module.
You can certainly pass functions defined in one module as arguments to
functions defined in another, completely unrelated module.  In fact,
Python doesn't care where they were defined or even whether they are
functions; they're just objects, no different in that regard from
strings or ints or class instances.



More information about the Python-list mailing list