Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.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.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'that?': 0.05; 'subject:Python': 0.06; 'subject:into': 0.09; 'cc:addr:python- list': 0.11; 'cleanly': 0.16; 'dict': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'really?': 0.16; 'subject:variable': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'example': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; "i've": 0.25; 'posts': 0.26; 'switch': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'ago': 0.33; 'table': 0.34; 'could': 0.34; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'subject:?': 0.36; 'how': 0.40; 'subject:Can': 0.60; 'times': 0.62; 'more': 0.64; 'mar': 0.68; 'statement,': 0.68; '"just': 0.84; '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=60c5QNVNQ+fjeCxP/NZ8ZxDOIQk1nBiu7GJLtbd5L9g=; b=v1ZQxGT+ZVnMH7FuSCphxQ2nZEhyUm1Z6epxFtOt68ue2HG9it7s+sbCuIoz4EOeBo l3TeP1M2QluhvJQitMUf0MK6tblOEIl9w2L4rBCRGlvyXdM7hH3Y/Jb+XwCWwhtEdk/r h0IHPyTRMarnlaVuZVHRDwUOxYez1/L1wtBDpbP2t+4UQMyYbpcWzxQaWXP3vFLONNb6 Fam/Xs8trKQYiYHvaHIZMj9nzVavBwoNAY+OS8B3hT3f2EbH23DfZZR8sO8WqwCPzkuI QyMgHWf0J4nMMABDEXF2keTiSPAOw71otdWFEqmbOEJxTby+Z3qMo1MhWFAy9GvVEno2 5H2Q== MIME-Version: 1.0 X-Received: by 10.66.27.202 with SMTP id v10mr5166969pag.127.1393613984658; Fri, 28 Feb 2014 10:59:44 -0800 (PST) In-Reply-To: <87iorzf4ro.fsf@elektro.pacujo.net> References: <27ac2248-0ca3-4ba6-9d25-eaad324bc5e9@googlegroups.com> <5f4f5a5f-327a-4616-8235-17ee9e74c488@googlegroups.com> <530fef58$0$11113$c3e8da3@news.astraweb.com> <871tynznpd.fsf@elektro.pacujo.net> <53104798$0$11113$c3e8da3@news.astraweb.com> <87ha7jy2qs.fsf@elektro.pacujo.net> <5310b031$0$29985$c3e8da3$5496439d@news.astraweb.com> <87iorzf4ro.fsf@elektro.pacujo.net> Date: Sat, 1 Mar 2014 05:59:44 +1100 Subject: Re: Can global variable be passed into Python function? 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: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1393613988 news.xs4all.nl 2886 [2001:888:2000:d::a6]:51575 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:67243 On Sat, Mar 1, 2014 at 5:53 AM, Marko Rauhamaa wrote: > A dict dispatch table is just awful. Really? How is that? I've used them, often. Yes, there are times when I could express something more cleanly with a C-style switch statement, but other times the dispatch table is fundamentally cleaner. I shared an example a few posts ago in this thread; care to elaborate on how it's "just awful"? ChrisA