The interaction shown below feels like a bug, or at least very much a
trap for the unwary. It's some sort of interaction between a context
manager and a generator, both of which can raise StopIteration. The
code is excised from a real application, so it's a bit artificial
looking. Nevertheless, it
On Thu, Apr 05, 2007, Bob Sidebotham wrote:
>
> The interaction shown below feels like a bug, or at least very much a
> trap for the unwary.
Please go ahead and file a bug report on SourceForge -- that way there
is a record.
--
Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraf
Isn't this violating the rule that a try/except should only enclose
the smallest expression where the exception is expected?
BTW this is probably more appropriate for c.l.py -- even if there's a
change to the language to come out of the discussion, it should be
held there until the use case is wel
At 03:54 PM 4/5/2007 -0400, Bob Sidebotham wrote:
>The interaction shown below feels like a bug, or at least very much a
>trap for the unwary. It's some sort of interaction between a context
>manager and a generator, both of which can raise StopIteration. The
>code is excised from a real applicatio
Guido van Rossum wrote:
> Isn't this violating the rule that a try/except should only enclose
> the smallest expression where the exception is expected?
Yeah, and I keep finding myself wanting to hyperlink to that "rule" in
the official docs, but it only seems to be written down in developer's
hea
"Robert Brewer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Guido van Rossum wrote:
| > Isn't this violating the rule that a try/except should only enclose
| > the smallest expression where the exception is expected?
|
| Yeah, and I keep finding myself wanting to hyperlink to th
> Guido van Rossum wrote:
>> Isn't this violating the rule that a try/except should only enclose
>> the smallest expression where the exception is expected?
>
> Yeah, and I keep finding myself wanting to hyperlink to that "rule" in
> the official docs, but it only seems to be written down in devel