In gen.throw(), are all three
arguments required? Or do the value
and traceback Nones need to be listed explicitly?
g.throw(MyException)
or
g.throw(MyException, None, None)
FWIW, I prefer the former. That will make throw() as flexible as
the raise statement.
Raymond
I've just fixed a bug where Py_INCREF wasn't called when it should
have been before a call to PyModule_AddObject (rev. 2.62 of
Modules/threadmodule.c).
So I went looking for other instances of the same problem. I didn't
find any (though I don't understand how _csv.c gets away with line
1579),
On Tue, 14 Jun 2005, Martin v. Löwis wrote:
Guido van Rossum wrote:
Intel has a free (as in beer) C compiler for Linux. A friend of mine
is involved in its production and marketing. He would like to see how
his compiler does on Python -- does it work at all, and is there a
speedup?
There
I believe that Algol 68 loops looked like the following (in somewhat
more Python-like terms):
[for identifier [from suite] [step suite] to suite]
[while suite]
do suite od
As far as I remember, it was:
do
suite
while suite; ending with a boolean value
Michael So I went looking for other instances of the same problem. I
Michael didn't find any (though I don't understand how _csv.c gets away
Michael with line 1579)...
Same reason the Py_INCREF of ProfileError isn't necessary I think.
PyDict_New() returns a new reference which is
Michael ... (though I don't understand how _csv.c gets away
Michael with line 1579)...
Michael Oops; I meant line 1590.
Hmmm... Me either. Is it possible it was just never DECREF'd? I checked
in the obvious fix on both head and the 2.4 release branch.
Skip
Hi Michael,
On Wed, Jun 15, 2005 at 01:35:35PM +0100, Michael Hudson wrote:
if (ProfilerError == NULL)
ProfilerError = PyErr_NewException(hotshot.ProfilerError,
NULL, NULL);
if (ProfilerError != NULL) {
Hi Skip,
On Wed, Jun 15, 2005 at 06:35:10AM -0700, [EMAIL PROTECTED] wrote:
Why this worked is a bit mystical. Perhaps it never gets freed because the
object just happens never to be DECREF'd (but that seems unlikely).
/* Add the Dialect type */
+ Py_INCREF(Dialect_Type);
Armin Rigo [EMAIL PROTECTED] writes:
Hi Michael,
On Wed, Jun 15, 2005 at 01:35:35PM +0100, Michael Hudson wrote:
if (ProfilerError == NULL)
ProfilerError = PyErr_NewException(hotshot.ProfilerError,
NULL, NULL);
if
Armin Rigo [EMAIL PROTECTED] writes:
Hi Skip,
On Wed, Jun 15, 2005 at 06:35:10AM -0700, [EMAIL PROTECTED] wrote:
Why this worked is a bit mystical. Perhaps it never gets freed because the
object just happens never to be DECREF'd (but that seems unlikely).
/* Add the Dialect type
Thanks both for answers,
I read some articles you link and I'd to say - alot discussion around!
I also found some notes that mod_python use some technique other than
GIL to allow multi-threading in Apache 2.0. Does someone know anything
closer? Any links or so?
Sorry I raise this old stuff
Nicolas Fleury [EMAIL PROTECTED] wrote:
Guido van Rossum wrote:
Why are you so excited about having until indented? You didn't give
any examples with multiple occurrences. A single occurrence works just
fine unindented, as PEP 315 has already shown.
FWIW, I must say I disagree (about
Charles Cazabon [EMAIL PROTECTED] wrote:
Indeed. The original poster seems to want something that would work (not
necessarily look) like this:
do:
block
while condition
with block executed once prior to condition first being tested. But the
above is ugly, and you can get
Jp Calderone:
for chunk in iter(lambda: f1.read(CHUNK_SIZE), ''):
f2.write(chunk)
Phillip J. Eby:
More seriously, I think your translation makes an excellent argument in
*favor* of having a do/while statement for greater clarity. :)
Michael Chermside
Interesting... I had the opposite
14 matches
Mail list logo