Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4a.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.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'tutorial': 0.03; 'nested': 0.07; 'cc:addr:python-list': 0.11; 'martin': 0.11; '24,': 0.16; 'at.': 0.16; 'collects': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'code,': 0.22; 'issue.': 0.22; 'cc:addr:python.org': 0.22; 'necessary.': 0.24; "shouldn't": 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'message- id:@mail.gmail.com': 0.30; 'figure': 0.32; 'subject: (': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'subject:one': 0.36; 'should': 0.36; 'pm,': 0.38; 'track': 0.38; 'solve': 0.60; 'mentioned': 0.61; "you'll": 0.62; 'name': 0.63; '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=xWYwpUHO85YfFMO78Z7IZzfvgfHxwYP13gSuk0yG9eE=; b=c5Wp2IMBh59oxdqwYTsMFgU46X4/dgdw5/6SvBj0Qi1FSBSSqGDn2PdVF6t7sCuCbq B328DPuDXTXeVJkZ0TIdIZlRqIfhrFEo12PoUxVJfcZl2qFY+QJS5BTuPPzzMYKUnUV6 6MLqdDrLMf71RRFwCedthORUhTgisH7r+b2SFfMlKC+tWj5V+iQvBsiD3+K/ljFAQ8YB OZZ80BxWjbVHnI/OsJn6wI78rJ497JQVyPr3LQDiSJ7TFI5DLBponJ7BBHh5LGZXrVhm 7A7cF1IMB9V/OvjMN3alJo1Tx4mybxvVN6VjJbyvbwXBIH7wNBpcn3weihnAMQU+PNwH +0mg== MIME-Version: 1.0 X-Received: by 10.52.248.232 with SMTP id yp8mr7573972vdc.83.1406187365889; Thu, 24 Jul 2014 00:36:05 -0700 (PDT) In-Reply-To: <600879be-1859-4435-8005-426813583cc7@gmail.com> References: <600879be-1859-4435-8005-426813583cc7@gmail.com> Date: Thu, 24 Jul 2014 17:36:05 +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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1406187370 news.xs4all.nl 2869 [2001:888:2000:d::a6]:45216 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75133 On Thu, Jul 24, 2014 at 5:27 PM, Martin S wrote: > Function A collects data and then calls function B with some, but also has > data that should be passed to function C. > > But ofc if nested functions are allowed then that might solve the issue. I > don't think I've seen nested functions mentioned in a tutorial I've been > looking at. Nested functions shouldn't be necessary. Just start writing code, then figure out what needs to go where. As long as you give a name to everything you need to keep track of, you'll find that pretty much everything 'just works'. ChrisA