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


Groups > comp.lang.python > #7418

Re: ContextDecorator via contextmanager: broken?

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'context': 0.04; 'url:bugs': 0.05; 'python': 0.08; 'kelly': 0.09; 'subject:broken': 0.09; 'pm,': 0.10; 'wrote:': 0.14; '*appear*': 0.16; '3.2.1': 0.16; '3.3.': 0.16; 'header:In-Reply-To:1': 0.21; 'ignore': 0.21; 'here?': 0.23; 'fri,': 0.23; 'received:209.85.161.46': 0.23; 'received:mail-fx0-f46.google.com': 0.23; 'received:209.85.161': 0.26; 'fixed': 0.27; 'message-id:@mail.gmail.com': 0.28; 'subject:?': 0.29; 'looks': 0.31; "can't": 0.32; 'to:addr:python- list': 0.33; 'actually': 0.33; 'first.': 0.34; '8bit%:8': 0.36; 'received:google.com': 0.37; 'something': 0.37; 'received:209.85': 0.37; 'url:python': 0.38; 'url:org': 0.38; 'subject:: ': 0.38; 'received:209': 0.39; 'to:addr:python.org': 0.39; 'missing': 0.40; 'simply': 0.60; 'subject:skip:C 10': 0.72; 'claim': 0.76
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=yWlMiyoC2AZDp9QRI47lyniDGnt6GQxLdrMjA4bKyuQ=; b=m4Row14d/sOrvygAFGyfCGU+6imbOgp61Y4AWu0tU7RGa/lf0LvFz+WLBZ/mBZUpL8 iQhOWEqRssDpyZYAgepr+WOSVQIi9Zto8iTdrq+xY5jIOKP5xbAmvmtT0i6d2TcdGPpL jC1orcJXCqchmELrnF0niKhkG4EEFIBas7QWM=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=Mn6UgMBa86XOp4Czm22US12KOeKDq2MaOfGkWhtJaVhFx1+QpCwSvy1QNl7CTMdTME R5ffjN8+XlRlBd6/4DCZm54K3XHVfMna7pQzXXEoFI39bN+qFK4NHnefEgfsMUfCq/EF vFjs2V27poWFWnLqsQyU13qGiC8dsE31agkdo=
MIME-Version 1.0
In-Reply-To <BANLkTi=U9JjfWQgDvJQUv48AD1r3AZsmTg@mail.gmail.com>
References <BANLkTi=U9JjfWQgDvJQUv48AD1r3AZsmTg@mail.gmail.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Fri, 10 Jun 2011 17:11:36 -0600
Subject Re: ContextDecorator via contextmanager: broken?
To Python <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.115.1307747527.11593.python-list@python.org> (permalink)
Lines 10
NNTP-Posting-Host 82.94.164.166
X-Trace 1307747527 news.xs4all.nl 49044 [::ffff:82.94.164.166]:35984
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:7418

Show key headers only | View raw


On Fri, Jun 10, 2011 at 4:57 PM, Ian Kelly <ian.g.kelly@gmail.com> wrote:
> So as far as I can tell, generator-based context managers simply can't
> be used as ContextDecorators.  Furthermore, the documentation's claim
> that they can is actually harmful, since they *appear* to work at
> first.  Or am I simply missing something here?

Please ignore my previous post. Looks like this has already been fixed
for Python 3.2.1 and 3.3.

http://bugs.python.org/issue11647

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


Thread

Re: ContextDecorator via contextmanager: broken? Ian Kelly <ian.g.kelly@gmail.com> - 2011-06-10 17:11 -0600

csiph-web