Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: [OT] Can global variable be passed into Python function? Date: Mon, 3 Mar 2014 14:18:09 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 29 Message-ID: References: <27ac2248-0ca3-4ba6-9d25-eaad324bc5e9@googlegroups.com> <87sird7wuw.fsf@handshake.de> <8454E8CB-E6E3-452F-8E54-9A77BFF34EC2@gmail.com> <1m3gg9lbf2ln5m2kbki954t17mqni3b20k@4ax.com> <53095145$0$29985$c3e8da3$5496439d@news.astraweb.com> <877g8mcg1m.fsf@elektro.pacujo.net> <87ob1yay9m.fsf@elektro.pacujo.net> <08aa32de-cd51-4888-bd60-2c2b53d86ecc@googlegroups.com> NNTP-Posting-Host: dsl.comtrol.com X-Trace: reader1.panix.com 1393856289 10757 64.122.56.22 (3 Mar 2014 14:18:09 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Mon, 3 Mar 2014 14:18:09 +0000 (UTC) User-Agent: slrn/1.0.1 (Linux) Xref: csiph.com comp.lang.python:67550 On 2014-03-02, Chris Angelico wrote: > On Mon, Mar 3, 2014 at 3:55 AM, Mark Lawrence wrote: >> On 02/03/2014 16:45, Grant Edwards wrote: >>> >>> >>> That's irrelevent. The actual location of the memory containing the >>> struct object (static, stack, heap, shared) doesn't matter. The >>> address of the first field in a struture object _is_ the address of >>> the structure object. >>> >> >> You say struture, I'll say structure, let's call the whole thing off :) > >:) > > Note that, technically, Grant is correct as long as you grant (heh) > that a structure may have an invisible member, the virtual function > table pointer. C++ only (I don't believe C has virtual functions - > but it may have grown them in one of the newer standards), so in C, > all members are public. Yes. I was talking about C, not C++. I made that quite clear in portions of my post that have been elided. In C there is no such thing as a virtual table pointer. -- Grant Edwards grant.b.edwards Yow! We have DIFFERENT at amounts of HAIR -- gmail.com