On Sun, Jan 18, 2009 at 11:03 PM, scott mc scott...@gmail.com wrote:
I built 2.7 on Haiku, but am getting failures in the regression tests.
Many of them are in math related tests, failing in the 15th decimal
place on test_decimal and a few others like that, I posted a ticket on
Haiku's trac
Hi,
Summary:
* In my organization, we have a *multi threaded* (threading library)
python (python 2.4.1) daemon on Linux, which starts up various processes
using the fork pipe exec model.
* We use this fork , wait on pipe , exec model as a form of handshake
between the parent and child
Gangadharan S.A. wrote:
Hi,
Summary:
* In my organization, we have a *multi threaded* (threading library)
python (python 2.4.1) daemon on Linux, which starts up various processes
using the fork pipe exec model.
The fork+threading combination had some fairly major issues that weren't
Please find below PEP 3142: Add a while clause to generator
expressions. I'm looking for feedback and discussion.
PEP: 3142
Title: Add a while clause to generator expressions
Version: $Revision: 68715 $
Last-Modified: $Date: 2009-01-18 11:28:20 +0100 (So, 18. Jan 2009) $
Author: Gerald Britton
On Mon, Jan 19, 2009 at 9:10 AM, Gerald Britton
gerald.brit...@gmail.com wrote:
Please find below PEP 3142: Add a while clause to generator
expressions. I'm looking for feedback and discussion.
PEP: 3142
Title: Add a while clause to generator expressions
Version: $Revision: 68715 $
On Mon, Jan 19, 2009 at 9:10 AM, Gerald Britton gerald.brit...@gmail.comwrote:
g = (n for n in range(100) if n*n 50)
would yield 0, 1, 2, 3, 4, 5, 6 and 7, but would also consider
the numbers from 8 to 99 and reject them all since n*n = 50 for
numbers in that range. Allowing for a
I am really unconvinced of the utility of this proposal and quite
convinced of the confusing factor it may well add to the current
syntax. I would like to see more applicable examples. It would replace
uses of takewhile, but that isn't a really often used function. So, is
there any evidence to
Sure: Say I implement the sieve of Eratosthenes as a prime number
generator. I want some primes for my application but there are an
infinite number of primes. So I would like to write:
prime = (p for p in sieve() while p 1000)
instead of:
import itertools
prime = takewhile(lamda
Thanks Calvin,
Could you please expand on your thoughts about possible confusion?
That is, how do you see a programmer becoming confused if this option
were added to the syntax.
On Mon, Jan 19, 2009 at 11:29 AM, Calvin Spealman ironfro...@gmail.com wrote:
I am really unconvinced of the utility
2009/1/19 Gerald Britton gerald.brit...@gmail.com:
Could you please expand on your thoughts about possible confusion?
That is, how do you see a programmer becoming confused if this option
were added to the syntax.
My main concern about confusion is that you're adding a while that
actually
On Mon, Jan 19, 2009 at 10:37 AM, Gerald Britton
gerald.brit...@gmail.comwrote:
prime = (p for p in sieve() while p 1000)
prime = takewhile(lamda p:p1000, sieve())
I'm pretty sure the extra cost of evaluating the lambda at each step is tiny
compared to the cost of the sieve, so I don't
I see output like this in several tests on my Mac:
test_array skipped --
dlopen(/Users/skip/src/python/trunk/build/lib.macosx-10.3-i386-2.7/cPickle.so,
2): Symbol not found: __PyObject_NextNotImplemented
Referenced from:
The sieve is just one example. The basic idea is that for some
infinite generator (even a very simple one) you want to cut it off
after some point. As for the number of characters, I spelled lambda
incorrectly (left out a b) and there should be a space after the colon
to conform to design
On Mon, Jan 19, 2009 at 11:41 AM, Gerald Britton
gerald.brit...@gmail.com wrote:
Thanks Calvin,
Could you please expand on your thoughts about possible confusion?
That is, how do you see a programmer becoming confused if this option
were added to the syntax.
I think that the difference
On Mon, Jan 19, 2009 at 11:51 AM, s...@pobox.com wrote:
I see output like this in several tests on my Mac:
test_array skipped --
dlopen(/Users/skip/src/python/trunk/build/lib.macosx-10.3-i386-2.7/cPickle.so,
2): Symbol not found: __PyObject_NextNotImplemented
Referenced from:
On Mon, Jan 19, 2009 at 7:10 AM, Gerald Britton
gerald.brit...@gmail.com wrote:
PEP: 3142
Title: Add a while clause to generator expressions
[snip]
numbers in that range. Allowing for a while clause would allow
the redundant tests to be short-circuited:
g = (n for n in range(100)
Gerald Britton wrote:
Please find below PEP 3142: Add a while clause to generator
expressions. I'm looking for feedback and discussion.
This was already discussed on python-ideas where it got negative feedback.
One objection, mentioned by Mathias Panzerbock and Georg Brandl, is that
it is
Duly noted and thanks for the feedback! (just what I was looking for
actually). I do disagree with the idea that the proposal, if
implemented, would make Python harder to learn. Not sure who would
find it harder. Having to find and use takewhile was harder for me.
I still find that one
- Mensaje original
De: Gerald Britton gerald.brit...@gmail.com
Para: Terry Reedy tjre...@udel.edu
CC: python-dev@python.org
Enviado: lunes, 19 de enero, 2009 15:03:47
Asunto: Re: [Python-Dev] PEP 3142: Add a while clause to generator
expressions
Duly noted and thanks for the
Vitor Bosshard wrote:
Are you even sure the list comprehension doesn't already shortcut evaluation?
It does not. The body of the comprehension is evaluated all the way to
completion, despite the fact that a.next() does not return until there
is a successful test of the if expression.
def
2009/1/19 Vitor Bosshard algor...@yahoo.com
- Mensaje original
De: Gerald Britton gerald.brit...@gmail.com
Para: Terry Reedy tjre...@udel.edu
CC: python-dev@python.org
Enviado: lunes, 19 de enero, 2009 15:03:47
Asunto: Re: [Python-Dev] PEP 3142: Add a while clause to
On Mon, Jan 19, 2009 at 1:41 PM, Scott Dial
scott+python-...@scottdial.com wrote:
Vitor Bosshard wrote:
Are you even sure the list comprehension doesn't already shortcut evaluation?
It does not. The body of the comprehension is evaluated all the way to
completion, ..
In addition, the test is
2009/1/19 Vitor Bosshard algor...@yahoo.com:
Are you even sure the list comprehension doesn't already shortcut evaluation?
This quick test in 2.6 hints otherwise:
a = (i for i in range(10) if i**210)
Yes, but your test, once it becomes true, remains so. Consider
list(n for n in range(10)
On Mon, Jan 19, 2009 at 10:03, Gerald Britton gerald.brit...@gmail.com wrote:
Duly noted and thanks for the feedback! (just what I was looking for
actually). I do disagree with the idea that the proposal, if
implemented, would make Python harder to learn. Not sure who would
find it harder.
If you run your python.exe under gdb you should be able to set a future
breakpoint on your _PyEval_EvalMiniFrameEx function and debug from there.
On Wed, Jan 14, 2009 at 8:28 PM, s...@pobox.com wrote:
I've recently been working on generating C functions on-the-fly which
inline
the C code
On 1/19/2009 6:51 PM, Terry Reedy wrote:
The other, posted by Steven Bethard, is that it fundamentally breaks the
current semantics of abbreviating (except for iteration variable
scoping) an 'equivalent' for loop.
The proposed syntax would suggest that this should be legal as well:
for i
Steven Bethard wrote:
-1. As I pointed out on python-ideas, this proposal makes while mean
something different in a generator expression.
While I initially found the suggestion in the PEP rather cute, that
isn't enough to make it a good idea as a language addition.
So, -1 for a few reasons:
-
folks, hi,
after some quiet advice i've tracked down a method for compiling
python2.5 using msvcr80 that _will_ actually work both under native
win32 and also under wine, but it's a _bit_ dodgy, as i couldn't track
down where you're supposed to put Microsoft.VC80.CRT, except in the
path of the
Are you all certain that this mapping from a generator expression to a foor
loop isn't just a happy coincidence?
After all, the generator statement is just a generalization of the list
comprehension and that doesn't map quite so directly.
I have always taken both expressions at face value, and
Alexander I cannot reproduce this on my Mac. It looks like you may
Alexander have an out of date python.exe in your sandbox. Please check
Alexander that
Alexander $ nm python.exe | grep PyObject_NextNotImplemented
Alexander 00052940 T __PyObject_NextNotImplemented
The proposal is similar to the c do statement
do statement while (expression);
which for whatever reason (infrequency?) like the switch statement have rightly
not been adopted into python.
winmail.dat___
Python-Dev mailing list
Python-Dev@python.org
Kristján Valur Jónsson wrote:
Are you all certain that this mapping from a generator expression to
a foor loop isn't just a happy coincidence?
Yes, The manual *defines* the meaning of a comprehension in terms of the
corresponding nested statements.
The comprehension consists of a single
Why does numbers.py say:
# Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
Weren't there multiple contributors including non-google people?
Does Google want to be associated with code that
was submitted with no tests?
Do we want this
OK, I still don't like the general idea, but I have a suggestion for
what I think is a more favorable syntax, anyway. Basically, adding the
allowance of an 'else break' when there is an if clause in a generator
expression or list comprehension. I still dont think it should be
done, but it is a
I have been writing up the initial docs for importlib and four things struck me:
1. Why is three space indents the preferred indentation level?
2. Should we start using function annotations?
3. Are brackets for optional arguments (e.g. ``def fxn(a [, b=None [,
c=None]])``) really necessary when
Raymond Hettinger writes:
Does the copyright concept even apply to an abstract base class (I
thought APIs were not subject to copyright, just like database
layouts and language definitions)?
Yes, it does, although a public API per se is not subject to
copyright, because there's only one
On 19Jan2009 19:42, Calvin Spealman ironfro...@gmail.com wrote:
| OK, I still don't like the general idea, but I have a suggestion for
| what I think is a more favorable syntax, anyway. Basically, adding the
| allowance of an 'else break' when there is an if clause in a generator
| expression or
On Mon, Jan 19, 2009 at 8:24 PM, Brett Cannon br...@python.org wrote:
I have been writing up the initial docs for importlib and four things struck
me:
1. Why is three space indents the preferred indentation level?
Because it matches nicely up with the length of directives:
..
Brett Cannon wrote:
3. Are brackets for optional arguments (e.g. ``def fxn(a [, b=None [,
c=None]])``) really necessary when default argument values are
present? And do we really need to nest the brackets when it is obvious
that having on optional argument means the rest are optional as well?
On Mon, Jan 19, 2009 at 19:01, Benjamin Peterson benja...@python.org wrote:
On Mon, Jan 19, 2009 at 8:24 PM, Brett Cannon br...@python.org wrote:
I have been writing up the initial docs for importlib and four things struck
me:
1. Why is three space indents the preferred indentation level?
On Mon, Jan 19, 2009 at 9:11 PM, Brett Cannon br...@python.org wrote:
On Mon, Jan 19, 2009 at 19:01, Benjamin Peterson benja...@python.org wrote:
On Mon, Jan 19, 2009 at 8:24 PM, Brett Cannon br...@python.org wrote:
2. Should we start using function annotations?
No, I think that information
From: Brett Cannon br...@python.org
1. Why is three space indents the preferred indentation level?
I've also wondered about this. It is somewhat incovenient
when bringing in code samples from files with four space indents.
Raymond
___
Python-Dev
On Mon, Jan 19, 2009 at 9:23 PM, Raymond Hettinger pyt...@rcn.com wrote:
From: Brett Cannon br...@python.org
1. Why is three space indents the preferred indentation level?
I've also wondered about this. It is somewhat incovenient
when bringing in code samples from files with four space
Benjamin Peterson benja...@python.org writes:
On Mon, Jan 19, 2009 at 9:23 PM, Raymond Hettinger pyt...@rcn.com wrote:
From: Brett Cannon br...@python.org
1. Why is three space indents the preferred indentation level?
I've also wondered about this. It is somewhat incovenient
when
I have another question about doc formatting.
What controls whether section headers get urls with a custom named jump target instead of
a default name like id1?
In particular, look at the urls for:
http://docs.python.org/dev/library/collections.html#id1
versus
Raymond Hettinger pyt...@rcn.com writes:
What controls whether section headers get urls with a custom named
jump target instead of a default name like id1?
In particular, look at the urls for:
http://docs.python.org/dev/library/collections.html#id1 versus
Hmm. Immediately preceding the
On Mon, Jan 19, 2009 at 19:19, Benjamin Peterson benja...@python.org wrote:
On Mon, Jan 19, 2009 at 9:11 PM, Brett Cannon br...@python.org wrote:
On Mon, Jan 19, 2009 at 19:01, Benjamin Peterson benja...@python.org wrote:
On Mon, Jan 19, 2009 at 8:24 PM, Brett Cannon br...@python.org wrote:
On Mon, Jan 19, 2009 at 19:50, Raymond Hettinger pyt...@rcn.com wrote:
I have another question about doc formatting.
What controls whether section headers get urls with a custom named jump
target instead of a default name like id1?
In particular, look at the urls for:
On Mon, Jan 19, 2009 at 19:02, Scott Dial
scott+python-...@scottdial.com wrote:
Brett Cannon wrote:
3. Are brackets for optional arguments (e.g. ``def fxn(a [, b=None [,
c=None]])``) really necessary when default argument values are
present? And do we really need to nest the brackets when it
In particular, look at the urls for:
http://docs.python.org/dev/library/collections.html#id1 versus
http://docs.python.org/dev/library/collections.html#abcs-abstract-base-classes
I would like all of the targets to have meaningful names.
[Brett]
Not sure from a sphinx perspective, but
50 matches
Mail list logo