Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #63244

Re: "More About Unicode in Python 2 and 3"

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 <rosuav@gmail.com>
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 <lablra$1mc$2@ger.gmane.org> <mailman.4944.1388928900.18130.python-list@python.org> <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 <rosuav@gmail.com>
Cc "python-list@python.org" <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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4987.1388966681.18130.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Mon, Jan 6, 2014 at 9:56 AM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> 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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: "More About Unicode in Python 2 and 3" Chris Angelico <rosuav@gmail.com> - 2014-01-06 00:34 +1100
  Re: "More About Unicode in Python 2 and 3" Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-06 09:56 +1100
    Re: "More About Unicode in Python 2 and 3" Chris Angelico <rosuav@gmail.com> - 2014-01-06 11:04 +1100
    Re: "More About Unicode in Python 2 and 3" Ethan Furman <ethan@stoneleaf.us> - 2014-01-05 16:13 -0800

csiph-web