Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:: [': 0.04; 'that?': 0.05; 'subject:Python': 0.06; 'received:internal': 0.09; 'subject:into': 0.09; '"o"': 0.16; '24,': 0.16; 'element.': 0.16; 'message-id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:66.111.4.27': 0.16; 'received:messagingengine.com': 0.16; 'received:out3-smtp.messagingengine.com': 0.16; 'subject:variable': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'subject:] ': 0.20; 'feb': 0.22; 'exists': 0.24; 'helpful': 0.24; 'mon,': 0.24; 'header:In-Reply-To:1': 0.27; 'michael': 0.29; "doesn't": 0.30; 'context,': 0.31; 'quite': 0.32; 'received:66': 0.35; 'surely': 0.36; 'subject:?': 0.36; 'received:10': 0.37; 'to:addr:python-list': 0.38; 'fact': 0.38; 'structure': 0.39; 'to:addr:python.org': 0.39; 'address.': 0.39; 'subject:Can': 0.60; 'from:no real name:2**0': 0.61; 'course': 0.61; 'first': 0.61; 'address': 0.63; 'header:Message-Id:1': 0.63; '2014,': 0.84 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; h= message-id:from:to:mime-version:content-transfer-encoding :content-type:in-reply-to:references:subject:date; s=mesmtp; bh= b/0+umpoqbVOPWkz9LZyk4oISjE=; b=micfAaU/QMTp63p/rGK69L32Jv4CqPvC TXqFtPUcGR0aqiMRfxaEZOrexiJ5R5Ym5BfnPYHnJ4gc5wKxclmnsYDl8OpDo8i+ oSUPVxYT3kY41bNjq2CbiF8qmxOi1EOwGobnKWyBETVSeOi7ML/BXJ7MCPP86qQZ O1DL3hbu+F4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:mime-version :content-transfer-encoding:content-type:in-reply-to:references :subject:date; s=smtpout; bh=b/0+umpoqbVOPWkz9LZyk4oISjE=; b=WSQ lLmObIRyMiQnCbdeHTVPMSrMEzgc3A5EvjFO6TCipT4xRG6ym4EnAywjFC4gnqAT C3WhN1bBQkzK7PCaP0uLvOJ69b9kot0suhqlj8xdUXZ/jUf1CWHOWKpZaAnnN28e lVJZnxh6+b73FAw8fYOHn9DC/XuX/NtP2Am65cV4= X-Sasl-Enc: RH450/XeMhFC2xetA8ampGqO/vswovfdmSB4kHS1gFTj 1393266101 From: random832@fastmail.us To: python-list@python.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-4527a23f In-Reply-To: <530B8D30.9050706@gmail.com> 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> <530B8D30.9050706@gmail.com> Subject: Re: [OT] Can global variable be passed into Python function? Date: Mon, 24 Feb 2014 13:21:41 -0500 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 8 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1393266109 news.xs4all.nl 2843 [2001:888:2000:d::a6]:39363 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:66990 On Mon, Feb 24, 2014, at 13:19, Michael Torrie wrote: > Why would you think that? The address of the start of your malloc'ed > structure is the same as the address of the first element. Surely this > is logical? And of course all this is quite off topic. That's not helpful - the problem, in context, is that he doesn't understand that the fact that the structure exists at that address is not the same thing as the variable "o" existing at that address.