Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed1.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '"this': 0.03; 'subject:Python': 0.06; 'error:': 0.07; 'nested': 0.07; 'assuming': 0.09; 'suppress': 0.09; 'try:': 0.09; 'worse': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'jan': 0.12; 'enough.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'implies': 0.16; 'personally,': 0.16; 'subject:More': 0.16; 'subject:Unicode': 0.16; 'all.': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'error': 0.23; 'mon,': 0.24; 'cc:2**0': 0.24; 'post': 0.26; 'least': 0.26; 'header:In- Reply-To:1': 0.27; 'fixed': 0.29; 'am,': 0.29; 'raise': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'that.': 0.31; "d'aprano": 0.31; 'releasing': 0.31; 'steven': 0.31; 'subject:About': 0.31; 'could': 0.34; "can't": 0.35; 'display': 0.35; 'except': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'false': 0.36; 'raising': 0.36; 'should': 0.36; 'supporting': 0.39; 'sure': 0.39; 'subject:"': 0.60; 'matter': 0.61; 'simple': 0.61; 'skip:n 10': 0.64; 'on?': 0.91; '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=r/1DQ1c852MpoSjmc1UYrrbHg3zrbZGUpfK9oEgXLFU=; b=uc2vfxOYmeYZySk/e3xy8IoAqkdF4h1maXT6NXg3NVIncVckdC7UaPG3xYf5X65XYN L8Xlk6sXDrKorsBISCrrMLrJcNRT7Eq1g5qDdiS1rbXHPZuiN53YTnfrZe93qgfxNwtR 8FWPhm/8hHqMKJd+pfTPUknjdq21sUlgELzPgWRHb01lA+6fvgq30SCT44MnxEwzUls/ zOwRYOOdKrHqKXjqQGUfyvYurB40uX6o8iG446hji1py98sM47m5kVDqggCGjE/mqake 0dk+pPKDJj4oD4JYAafj7XBfXIE0++rhaUWFiEaLNY7uy8jqoxqwocCv1Y67rGrW6+bj 9nEw== MIME-Version: 1.0 X-Received: by 10.68.196.193 with SMTP id io1mr120230024pbc.46.1388966677814; Sun, 05 Jan 2014 16:04:37 -0800 (PST) In-Reply-To: <52c9e31d$0$9505$c3e8da3$5496439d@news.astraweb.com> References: <52c9e31d$0$9505$c3e8da3$5496439d@news.astraweb.com> Date: Mon, 6 Jan 2014 11:04:37 +1100 Subject: Re: "More About Unicode in Python 2 and 3" 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: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1388966681 news.xs4all.nl 2849 [2001:888:2000:d::a6]:47824 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63244 On Mon, Jan 6, 2014 at 9:56 AM, Steven D'Aprano wrote: >> Why is a StopIteration bubbling up? (I don't have Flask, so I can't >> verify this.) Is it as simple as "this should be raising from None", >> or is there something else going on? > > Remember that "raise Spam from None" only works from Python 3.3 onwards. > Personally, I think that releasing nested tracebacks before having a way to > suppress the display was a strategic blunder, but it's fixed now, at least > for those who can jump straight to 3.3 and not bother supporting 3.1 and > 3.2. Fair enough. If it's a problem, I'm sure Flask could do something like (untested): error = False try: next(whatever) except StopIteration: error = True if error: raise ValueError("...") which would work across all. But that's assuming that it really is just a small matter of traceback ugliness. The post implies that it's a lot worse than that. ChrisA