Alexander Belopolsky writes:
Why have builtin sum at all if its use comes with so many caveats?
Because we already have it. If the caveats had been known when it was
introduced, maybe it wouldn't have been. The question is whether you
can convince python-dev that it's worth changing the
On 9 August 2014 06:08, Steven D'Aprano st...@pearwood.info wrote:
py with Stopwatch():
... sum(carray) # carray is a numpy array of 7500 floats.
...
11250.0
time taken: 52.659770 seconds
py with Stopwatch():
... numpy.sum(carray)
...
11250.0
time taken: 0.161263
Just thought I'd share some of my excitement about how fast the all-C
version [1] of os.scandir() is turning out to be.
Below are the results of my scandir / walk benchmark run with three
different versions. I'm using an SSD, which seems to make it
especially faster than listdir / walk. Note that
On Sat, Aug 9, 2014 at 3:08 AM, Stephen J. Turnbull step...@xemacs.org
wrote:
All the suggestions
I've seen so far are (IMHO, YMMV) just as ugly as the present
situation.
What is ugly about allowing strings? CPython certainly has a way to to
make sum(x, '') at least as efficient as y='';for
On Sat, Aug 9, 2014 at 2:02 PM, Alexander Belopolsky
alexander.belopol...@gmail.com wrote:
y='';for in in x; y+= x
Should have been
y=''
for i in x; y += i
___
Python-Dev mailing list
Python-Dev@python.org
Hi.
Referring to my discussion on [1] and then on #python this afternoon.
A little background would help people to understand where this was
coming from.
1. I write Python 2 code and have done zero Python-3 specific code.
2. I have always been using class Foo(object) so I do not know the new
On Sat, Aug 9, 2014 at 1:08 AM, Steven D'Aprano st...@pearwood.info wrote:
We wouldn't be having
these interminable arguments about using sum() to concatenate strings
(and lists, and tuples) if the operator was used for concatenation and
+ was only used for numeric addition.
But we would
On 8/9/2014 2:44 PM, John Yeuk Hon Wong wrote:
Hi.
Referring to my discussion on [1] and then on #python this afternoon.
A little background would help people to understand where this was
coming from.
1. I write Python 2 code and have done zero Python-3 specific code.
2. I have always been
On Sat, Aug 9, 2014 at 12:20 PM, Alexander Belopolsky
alexander.belopol...@gmail.com wrote:
On Sat, Aug 9, 2014 at 1:08 AM, Steven D'Aprano st...@pearwood.info wrote:
We wouldn't be having
these interminable arguments about using sum() to concatenate strings
(and lists, and tuples) if the
On Sat, Aug 09, 2014 at 02:44:10PM -0400, John Yeuk Hon Wong wrote:
Hi.
Referring to my discussion on [1] and then on #python this afternoon.
A little background would help people to understand where this was
coming from.
1. I write Python 2 code and have done zero Python-3 specific
On Sun, Aug 10, 2014 at 10:44 AM, Steven D'Aprano st...@pearwood.info wrote:
Looking at your comment here:
[1]: https://news.ycombinator.com/item?id=8154471
there is a reply from zeckalpha, who says:
Actually, leaving out `object` is the preferred convention for
Python 3, as they
Le 09/08/2014 12:43, Ben Hoyt a écrit :
Just thought I'd share some of my excitement about how fast the all-C
version [1] of os.scandir() is turning out to be.
Below are the results of my scandir / walk benchmark run with three
different versions. I'm using an SSD, which seems to make it
On 10 August 2014 13:20, Antoine Pitrou anto...@python.org wrote:
Le 09/08/2014 12:43, Ben Hoyt a écrit :
Just thought I'd share some of my excitement about how fast the all-C
version [1] of os.scandir() is turning out to be.
Below are the results of my scandir / walk benchmark run with
13 matches
Mail list logo