On Jan 20, 2006, at 1:39 PM, Phillip J. Eby wrote:
> At 11:19 AM 01/20/2006 -0800, Guido van Rossum wrote:
>> (There *are*other uses besides the trampoline,
>> right? :-)
>
> It's easy to come up with use cases where you feed data *into* a
> generator
> (parsers and pipelines, for example). I
> The discussion about PEP 343 reminds me of the following. Bram Cohen
> pointed out in private email that, before PEP 342, there wasn't a big
> need for a shortcut to pass control to a "sub-generator" because the
> following for-loop works well enough:
> def main_generator():
> ...
>
Nick Coghlan wrote:
> Exception propagation is a different story. What do you want to propagate?
> All
> exceptions from the body of the for loop? Or just those from the yield
> statement?
>
> Well, isn't factoring out exception processing part of what PEP 343 is for?
># We can even limit
Phillip J. Eby wrote:
>> Thoughts?
>
> If we have to have a syntax, "yield from sub_generator()" seems clearer
> than "yieldthrough", and doesn't require a new keyword.
Andrew Koenig suggested the same phrasing last year [1], and I liked it then.
I don't like it any more, though, as I think it
Jason Orendorff wrote:
> On 1/20/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
>> Jason Orendorff wrote:
>>> DecimalContext has a few problems. In code where it matters, every
>>> function you write has to worry about it. (That is, you can't just
>>> write __decimal_context__ = ... at the top of the
At 11:19 AM 01/20/2006 -0800, Guido van Rossum wrote:
>(There *are*other uses besides the trampoline,
>right? :-)
It's easy to come up with use cases where you feed data *into* a generator
(parsers and pipelines, for example). I just don't know of any
"simultaneous bidirectional" uses other tha
Barry Warsaw wrote:
> On Fri, 2006-01-20 at 21:43 +0100, Thomas Wouters wrote:
>
>> I don't believe this belongs in 2.4, since it can, actually, break code.
>> Code that depends on the current situation, _TestCase__attributename.
>> Fragile code, to be sure, but still. If there were a compelling r
On Fri, 2006-01-20 at 21:43 +0100, Thomas Wouters wrote:
> I don't believe this belongs in 2.4, since it can, actually, break code.
> Code that depends on the current situation, _TestCase__attributename.
> Fragile code, to be sure, but still. If there were a compelling reason to
> backport, I gues
Right. This *definitely* is a feature, not a bug.
On 1/20/06, Thomas Wouters <[EMAIL PROTECTED]> wrote:
> On Fri, Jan 20, 2006 at 06:55:03PM +0100, georg.brandl wrote:
> > Author: georg.brandl
> > Date: Fri Jan 20 18:55:02 2006
> > New Revision: 42116
> >
> > Modified:
> >python/branches/relea
On Fri, Jan 20, 2006 at 06:55:03PM +0100, georg.brandl wrote:
> Author: georg.brandl
> Date: Fri Jan 20 18:55:02 2006
> New Revision: 42116
>
> Modified:
>python/branches/release24-maint/Lib/unittest.py
> Log:
> Patch #1388073: Make unittest.TestCase easier to subclass
I don't believe this be
On 1/20/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> Jason Orendorff wrote:
> > DecimalContext has a few problems. In code where it matters, every
> > function you write has to worry about it. (That is, you can't just
> > write __decimal_context__ = ... at the top of the file and be done
> > with
On Tue, 17 Jan 2006, Thomas Mangin wrote:
[...]
> I have hit a bug with python 2.4.2 (on Mandriva 2006) using urllib2.
> The code which trigger the bug is as follow..
>
> import urllib2
> req = urllib2.Request("http://66.117.37.13/";)
>
> # makes no difference ..
> req.add_header('Connection', 'clo
Guido van Rossum <[EMAIL PROTECTED]> wrote:
The discussion about PEP 343 reminds me of the following. Bram Cohen
pointed out in private email that, before PEP 342, there wasn't a big
need for a shortcut to pass control to a "sub-generator" because the
following for-loop works well enough:
def ma
On 1/20/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> At 10:17 AM 01/20/2006 -0800, Guido van Rossum wrote:
> >The discussion about PEP 343 reminds me of the following. Bram Cohen
> >pointed out in private email that, before PEP 342, there wasn't a big
> >need for a shortcut to pass control to a
Or the Web-SIG mailing list.
Bill
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
At 10:17 AM 01/20/2006 -0800, Guido van Rossum wrote:
>The discussion about PEP 343 reminds me of the following. Bram Cohen
>pointed out in private email that, before PEP 342, there wasn't a big
>need for a shortcut to pass control to a "sub-generator" because the
>following for-loop works well eno
Guido van Rossum <[EMAIL PROTECTED]> wrote:
> The discussion about PEP 343 reminds me of the following. Bram Cohen
> pointed out in private email that, before PEP 342, there wasn't a big
> need for a shortcut to pass control to a "sub-generator" because the
> following for-loop works well enough:
On Tue, Jan 17, 2006, Thomas Mangin wrote:
>
> I am contacting the list in the hope that someone will be able to
> understand what I am seeing.
You'll probably get more help by subscribing and posting to
comp.lang.python.
--
Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.c
The discussion about PEP 343 reminds me of the following. Bram Cohen
pointed out in private email that, before PEP 342, there wasn't a big
need for a shortcut to pass control to a "sub-generator" because the
following for-loop works well enough:
def main_generator():
...
for value in
At 07:21 PM 01/20/2006 +1000, Nick Coghlan wrote:
>Yeah, it came up in response to PJE's suggestion of task-local variables for
>generators. The basic concept we came up with is that if you're writing a
>generator that uses a specific context, remember to save the original and
>restore it around an
[Tim]
>> ...
>> As a result, it so happens that core Python never uses the original
>> PyThreadState_Delete() anymore, except when Py_NewInterpreter() has
>> to throw away the brand new thread state it created because it turns out
>> it can't create a new interpreter.
[Michael]
> Um, PyThreadState
Steve Holden wrote:
> Connelly Barnes wrote:
>> Hi,
>>
>> Perhaps I am the only one bothered by the timeit
>> module, but it seems poorly designed to me.
>>
>> First of all, it should use a geometric series with a
>> timeout value to detect how many iterations it should
>> perform. Currently, the
> I think it's moot unless you also preserve comments. Ideally would be
> something that prserved everything (ordering, blank lines, comments
> etc.) from how it was read in. Modifying a value should keep its
> position. Adding a value should add it to the end of the section it's
> in (unless there
> "BAW" == Barry Warsaw <[EMAIL PROTECTED]> writes:
BAW> Unix weenies shouldn't be totally forgotten in P3K.
Great idea! Put all this stuff in a "weenie" module. You can have
weenie.unix and weenie.vms and weenie.unicode, besides the weenie.math
that got all this started.
--
School of
[Tony Meyer]
> Allowing 'surgical' editing of configuration files, as has been
> proposed many times both here and c.l.p would not require
> ConfigParser to be entirely rewritten (just more extensive
> modification of the write() method).
After writing the summary of this thread, I figured I might
Connelly Barnes wrote:
>> Hi,
>>
>> Perhaps I am the only one bothered by the timeit
>> module, but it seems poorly designed to me.
>>
>> First of all, it should use a geometric series with a
>> timeout value to detect how many iterations it should
>> perform. Currently, the user is required to
Hello,
I am contacting the list in the hope that someone will be able to understand
what I am seeing.
I have hit a bug with python 2.4.2 (on Mandriva 2006) using urllib2.
The code which trigger the bug is as follow..
import urllib2
req = urllib2.Request("http://66.117.37.13/";)
# makes no di
Tim Peters <[EMAIL PROTECTED]> writes:
> [Gabriel Becedillas]
>> Can anybody tell me if the patch I suggested is ok ?
>> That will be to add the following code at the end of PyThreadState_Delete:
>>
>> if (autoTLSkey && PyThread_get_key_value(autoTLSkey) == tstate)
>> PyThread_delete_key_valu
Jason Orendorff wrote:
> I just noticed that my name is in PEP 343 attached to the idea of the
> __context__() method, and I'm slightly queasy over it.
>
> The rationale was to help e.g. decimal.DecimalContext support 'with'.
> Maybe that's a bad idea.
>
> DecimalContext has a few problems. In
29 matches
Mail list logo