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


Groups > comp.lang.python > #75133

Re: one to many (passing variables)

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 <rosuav@gmail.com>
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 <CAHXoDSB+-Vkggfd57nb9eLSK7Pb_fbuycGTJZM=+6=4VZo3F0w@mail.gmail.com> <CAPTjJmr8nQfhM7JRBJGc=hew4H8kKjkD2xU71H67HaDVcP6W=g@mail.gmail.com> <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 <rosuav@gmail.com>
Cc "python-list@python.org" <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 <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.12272.1406187370.18130.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Thu, Jul 24, 2014 at 5:27 PM, Martin S <shieldfire@gmail.com> 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

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


Thread

Re: one to many (passing variables) Chris Angelico <rosuav@gmail.com> - 2014-07-24 17:36 +1000

csiph-web