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 code
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_value(autoTLSkey);
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
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 manually
[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 as
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 Systems
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 are
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 user is required
[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_Delete()
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
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.com/
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
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 enough:
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
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
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
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', 'close')
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 it, the
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 belongs
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 than
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 file and be
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 is too
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 the
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
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 just
25 matches
Mail list logo