Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.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.173 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.68; '*S*': 0.02; 'happen,': 0.09; 'roy': 0.16; ':-)': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'raise': 0.29; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; 'assert': 0.31; 'but': 0.35; 'received:google.com': 0.35; 'subject:new': 0.38; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'subject:"': 0.60; 'for:': 0.64; 'it!': 0.67; 'smith': 0.68; 'subject:else': 0.84; 'write:': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type:content-transfer-encoding; bh=GLo92CG5cVs+1gGS2wgBflsR4jg0u0wSTn0AVGdTTRY=; b=cxA3O1IJ6gl7OkUc06LazCyLtqHl+gfV8cXnsHa1Oub8VPB9hyrpRf8hSoxu0ZdZWk JRSSnUj3XvPID8GMp2h9W7G0cxROg2HFfpyx0cNKCC63s9EHG83DqsGegTtuwCP3kuP/ krswTTKGr23c8/H2+HVSoar45VOS/J7KPxSAzS3nkUep/DYdmRqYZBFAkbFnzq1U/EiV bNB5spciv7NTDK2ovsVGf3ivAMGs6mlIpctIXD2WeaF0hPA2nLLx7otbhOCoJgVvY2rn fppvwLVzb6i5T79Z85570XeJ56MxCBVSY/cta9sjGvieBIq5EGnrgQMA9MgVn8/xfwpP PSOA== X-Received: by 10.202.218.2 with SMTP id r2mr304639oig.82.1417542086187; Tue, 02 Dec 2014 09:41:26 -0800 (PST) MIME-Version: 1.0 Sender: zachary.ware@gmail.com In-Reply-To: References: From: Zachary Ware Date: Tue, 2 Dec 2014 11:41:06 -0600 X-Google-Sender-Auth: 1YGRtImJQ24GoTMiqplzSqIDg7s Subject: Re: Proposed new conditional operator: "or else" To: Python Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1417542094 news.xs4all.nl 2972 [2001:888:2000:d::a6]:47626 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:81805 On Tue, Dec 2, 2014 at 11:18 AM, Roy Smith wrote: > Wouldn=E2=80=99t it be neat to write: > > foo =3D=3D 42 or else > > and have that be an synonym for: > > assert foo =3D=3D 42 > > :-) Never going to happen, but I like it! Perhaps raise IntimidationError instead of AssertionError when it fails? --=20 Zach