Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #43850

Re: equivalent to C pointer

Path csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.013
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'dynamically': 0.07; 'think,': 0.07; 'arguments': 0.09; 'instances.': 0.09; 'objects,': 0.09; 'pointers': 0.09; 'python': 0.11; 'functions;': 0.16; 'wrote:': 0.18; 'library': 0.18; 'module': 0.19; 'thu,': 0.19; 'import': 0.22; 'certainly': 0.24; 'define': 0.26; 'equivalent': 0.26; 'pass': 0.26; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; "doesn't": 0.30; 'message- id:@mail.gmail.com': 0.30; 'class': 0.32; 'alone': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'module.': 0.36; 'thanks': 0.36; 'to:addr:python-list': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'even': 0.60; 'save': 0.62; 'different': 0.65; 'linked': 0.65; 'fact,': 0.69; 'power': 0.76; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=LseTTpYRejf4fJZNEaGHmIwlLW1h7alrCZBhFwb0hP4=; b=vSswWcXR8VNoz8HPWBl5jMEbeABxP7/P8wuUPPfYzfzQNBVIFHrib37oJtZ6/Pdtca 446+Hm42OJX/hzv+bw7nSDSFY10+HkzMOMGMmnAwpiTYSu/yv3qcFxBndDDTrR+hk94t lcR4CewX654NGyx1H7thbVTuoXxHv4Y5NeTBfskZ1e3cBjcEaoOBly1kBQCViO8Yx+JG a/hl3SAM3dGPrioXIZL6QiVJF1/9mJ0aPmWlagrPRNzNYSo5Rr1Xif0DxC2zHHQwr2a6 wdzqOHfcMeU50YIyv3BboK1zng44wBkmDPEZ77Dff2vrEpJGgVPQaN6FLac5ldrzGUVz DjJA==
X-Received by 10.66.248.227 with SMTP id yp3mr1560962pac.158.1366309580492; Thu, 18 Apr 2013 11:26:20 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <CAF3f0sTgxWupYqKDdtqqaPBz2kCZ04404rtDBnsOkDLXAfbQpQ@mail.gmail.com>
References <CAF3f0sQ_rsdKwaEOCmFHEeEwpVUaNUo-pOYgoqYA_F-k0CftcA@mail.gmail.com> <51702AB6.30609@gmail.com> <CAF3f0sTgxWupYqKDdtqqaPBz2kCZ04404rtDBnsOkDLXAfbQpQ@mail.gmail.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Thu, 18 Apr 2013 12:25:40 -0600
Subject Re: equivalent to C pointer
To Python <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.787.1366309589.3114.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1366309589 news.xs4all.nl 2304 [2001:888:2000:d::a6]:45699
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:43850

Show key headers only | View raw


On Thu, Apr 18, 2013 at 11:50 AM, abdelkader belahcene
<abelahcene@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.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: equivalent to C pointer Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-18 12:25 -0600

csiph-web