Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!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.033 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'cc:addr:python-list': 0.11; 'martin': 0.11; '24,': 0.16; 'code?': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'module?': 0.16; 'top-level': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'cc:addr:python.org': 0.22; 'logical': 0.24; 'cc:2**0': 0.24; 'pass': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'message-id:@mail.gmail.com': 0.30; 'them?': 0.31; 'subject: (': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'subject:one': 0.36; 'pm,': 0.38; 'little': 0.38; 'bad': 0.39; 'itself': 0.39; 'how': 0.40; 'ensure': 0.60; 'between': 0.67; 'jul': 0.74; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=bg4WMDIVBhNT4x/pIFcWoDbk9yqqbW5TFQiKjj+QOlY=; b=C7KfGzqXYjXFITnxHB9puBRNrKB8x0kGmp/OvnJYDWQ9rtPzsLvm6B0apGCPTNt3hd ICYWn+n4xlTcAor9Bc2s7FGUEapt637DVVYWocBEdRolXqfQ9ss5f7vePjcAnJcvmC9P 2Y/cfurXdniXkR+t8Mm7tva/FZfdqpnSB5UAWFJldlOvGhtATSzS+LgG3N9LgNi8gpgI FBL0EUR2Nb7Xc62/fkNWQmU/TUuQa5jxUSwWOVlJU5n/I5g97DNUqGyQh/Le2x7Enso8 iW7ownpwBdTO0c0j7DjcZc04J8TjN2yqHd/o+ul7WoZ0lwjlLELilMOW0EbxCRfls8H+ ja4A== MIME-Version: 1.0 X-Received: by 10.52.119.179 with SMTP id kv19mr7270452vdb.3.1406185681207; Thu, 24 Jul 2014 00:08:01 -0700 (PDT) In-Reply-To: References: Date: Thu, 24 Jul 2014 17:08:01 +1000 Subject: Re: one to many (passing variables) From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1406185683 news.xs4all.nl 2926 [2001:888:2000:d::a6]:36665 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75130 On Thu, Jul 24, 2014 at 4:36 PM, Martin S wrote: > How do you pass data from one function to many? > > I have functions A B and C. If data generated in A is useable in both > B and C how do I ensure this data is passed as needed? Or is it a > symptom of bad code? This is a little vague. Is there one function which calls A and then calls B and C? What's the relationship between them? Is it logical for A to itself call B and C? Are they all methods off one object? Top-level functions in a module? ChrisA