Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed4.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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'constructor': 0.09; 'oh,': 0.09; 'throws': 0.09; 'wrapper': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'declared': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'lambda': 0.16; 'subject:programming': 0.16; 'throw': 0.16; 'exception': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'trying': 0.19; "python's": 0.19; 'cc:addr:python.org': 0.22; 'simpler': 0.24; 'cc:2**0': 0.24; 'handling': 0.26; 'pass': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'easier': 0.31; 'comparison': 0.31; 'types.': 0.31; 'with,': 0.31; 'created': 0.35; 'problem.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'shows': 0.36; 'how': 0.40; 'free': 0.61; "you're": 0.61; 'mar': 0.68; 'limitations,': 0.84; 'to:none': 0.92; 'have.': 0.93 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=umY5t1muct2WrCEMRM6XWIvJyH3hK4ZFfOogCp41sKU=; b=p6F+nMLBr6xJOIlB0UztMha+IV/oqVu6ZTmmav3Mx8V0DpiZVjXJ2XYfq9KzNQRZIu gDbdJUsLSg7xwDX8iXDcJ7EUFprtfWM767MpmiBl8gUio4W9XteNydhfXdzjTRUceYaA owOChmEfbO8K1xWPbr8MNmAgCL0zTN8V6k0mVtNSWaQz38AUxKqaWW5/bAPQVI7UZc8E ITLQ1MpR6+K5wURLm/flmHdWAA62ff0zVeRU1gTfppZH9C3bN/FQFf5PZVHildZlE4ih kKX6G+cS42ww6MgrLGeFVFRxr4EV0wD0w8yISDL1onwDj5Obd82FJF/Hhcek7sM9jood c58Q== MIME-Version: 1.0 X-Received: by 10.66.164.229 with SMTP id yt5mr1932566pab.67.1393967177403; Tue, 04 Mar 2014 13:06:17 -0800 (PST) In-Reply-To: <8738ixofhl.fsf@elektro.pacujo.net> References: <4c7dbc57-eef9-4582-aecd-aac13a39b45f@googlegroups.com> <3b54a279-03a1-4a81-a428-ecad6eb16036@googlegroups.com> <216bb5f4-32c4-4f86-a9f4-1b0dd37a2a81@googlegroups.com> <0129a5b9-b85f-4ad5-b5e2-bfb2a48041d5@googlegroups.com> <5314bb96$0$29985$c3e8da3$5496439d@news.astraweb.com> <5315661c$0$2923$c3e8da3$76491128@news.astraweb.com> <53159540$0$2923$c3e8da3$76491128@news.astraweb.com> <87bnxloibq.fsf@elektro.pacujo.net> <8738ixofhl.fsf@elektro.pacujo.net> Date: Wed, 5 Mar 2014 08:06:17 +1100 Subject: Re: Functional programming 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: 1393967180 news.xs4all.nl 2885 [2001:888:2000:d::a6]:49917 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:67721 On Wed, Mar 5, 2014 at 7:50 AM, Marko Rauhamaa wrote: > The "rigmarole" is trying to get around Java's mandatory exception > handling limitations, which Python doesn't have. > > You are not allowed to pass a lambda to the super constructor that > throws an SQLException. To get around the limitation, a RuntimeException > wrapper is created to smuggle the SQLException through the compiler's > defenses. Any code is free to throw a RuntimeException. > Oh, it's THAT problem. Well, it's still not really a fair comparison of declared types. It shows how Python's much easier to work with, but what you're showing off is the simpler exception handling :) ChrisA