Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4a.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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'output': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'separating': 0.09; 'subject:files': 0.09; 'jan': 0.12; 'chunks': 0.16; 'easier.': 0.16; 'parameter.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'wrote:': 0.18; '(where': 0.19; 'possible,': 0.19; 'header:User-Agent:1': 0.23; 'driver': 0.24; 'example.': 0.24; 'decide': 0.24; 'options': 0.25; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'testing': 0.29; 'am,': 0.29; 'program,': 0.31; 'really': 0.36; 'yield': 0.36; 'should': 0.36; 'to:addr:python- list': 0.38; 'aside': 0.39; 'received:71': 0.39; 'subject:" ': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'results.': 0.60; 'most': 0.60; 'information': 0.63; 'such': 0.63; 'subject:The': 0.64; 'results': 0.69; 'received:fios.verizon.net': 0.84; 'results,': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: The "right" way to use config files Date: Sat, 09 Aug 2014 13:29:59 -0400 References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-71-175-90-87.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: 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: 1407605431 news.xs4all.nl 2908 [2001:888:2000:d::a6]:37391 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75952 On 8/9/2014 7:48 AM, Fabien wrote: > BUT, my "problem" is that several options really are "universal" options > to the program, such as the output directory for example. This > information (where to write their results) is given to most of the > functions as parameter. If possible, functions should *return* their results, or yield their results in chunks (as generators). Let the driver function decide where to put results. Aside from separating concerns, this makes testing much easier. -- Terry Jan Reedy