Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3a.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.062 X-Spam-Evidence: '*H*': 0.88; '*S*': 0.01; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'happen,': 0.09; 'message-id:@stoneleaf.us': 0.09; '~ethan~': 0.09; 'filename:fname piece:signature': 0.16; 'roy': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'header:In-Reply- To:1': 0.27; 'rest': 0.29; 'am,': 0.29; 'raise': 0.29; 'dec': 0.30; 'lines': 0.31; 'assert': 0.31; 'but': 0.35; 'raising': 0.36; 'subject:new': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'subject:"': 0.60; 'received:173': 0.61; 'for:': 0.64; 'it!': 0.67; 'smith': 0.68; 'surrounding': 0.68; 'subject:else': 0.84; 'ware': 0.91; 'write:': 0.91 Date: Tue, 02 Dec 2014 10:06:29 -0800 From: Ethan Furman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Proposed new conditional operator: "or else" References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qu3cI10cocEvXc3Tgn09BNqbq8f1EtvIx" 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: 50 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1417543599 news.xs4all.nl 2862 [2001:888:2000:d::a6]:55076 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:81806 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qu3cI10cocEvXc3Tgn09BNqbq8f1EtvIx Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 12/02/2014 09:41 AM, Zachary Ware wrote: > 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 >=20 > Never going to happen, but I like it! Perhaps raise IntimidationError > instead of AssertionError when it fails? As long as when raising Intimidation, it also roughs up a couple surround= ing lines as a warning to the rest of the code... -- ~Ethan~ --qu3cI10cocEvXc3Tgn09BNqbq8f1EtvIx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJUff+pAAoJENZ7D1rrH75NS/EQAMDp/1QySpaKcJGaCtJeCkhj lexcuBWwse9jtgAOS79YcUrTbCqrn0y+kQ90yoOZBROC0XhO00uQW23YhV1BUzlT dIMaKEYKIU5ULK6W+QNZYm0Ah9SO038u4y1geFFVmnA25B2yieMYS0pJ9BHwnTQp MOIAb7w5F4H6MV7GmHXeIBSlwivaDUs7dE9xUjfhv8zytl1z42bFsHQX6pfDfEqq hl8VFywd0Y0uR7x/os54Am/AGwcZ/Mu6kf9jiR/C1hL6YXrQ6ETTz2NCBHOkNDMe wGf5+l5ABo4fkV6ryiAuYKMUDPWtK9V9/o+ra3MErAI/gwV4OdUIh0Sc9V5Mg5/k jtBeMpmptjnakRGXvBPtx+5xvUZbUGx4WnFeYbUVoi8sJYq2l/2YSTL23/DnHV6l uXlTZmGRmHb/in5wboWq4+1TneCEcMXTwwS4ZcFeLGnRfQBfFj/Fd4FaWiNF+UiG AJp8iFa7OdFgoPg2lyhOnQHU9H/30ma9yFgpfaX9wm/fjzqi6UN1ogfv0sziAhV/ ylTmuG3Pa/LXDO/1+kKrOtHBh6CQuYkaOdeAySgh38u+PXjhlm/UZoWKRM4GH52a 2mLRoWouSQIErxgczxtQWr623woh7i9x3VxtquA28fM9kXvYsEXBSo1GVBX+w+rf v6NyH4FPIbd6HhMc32WQ =rGmr -----END PGP SIGNATURE----- --qu3cI10cocEvXc3Tgn09BNqbq8f1EtvIx--