On 08/09/2014 10:40 PM, Robert Collins wrote:
A small tip from my bzr days - cd into the directory before scanning it
I doubt that's permissible for a library function like os.scandir().
//arry/
___
Python-Dev mailing list
Python-Dev@python.org
http
A small tip from my bzr days - cd into the directory before scanning
it - especially if you'll end up statting more than a fraction of the
files, or are recursing - otherwise the VFS does a traversal for each
path you directly stat / recurse into. This can become a dominating
factor in some workloa
On 10 August 2014 13:20, Antoine Pitrou 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 three
>> diff
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
especia
On Sun, Aug 10, 2014 at 10:44 AM, Steven D'Aprano 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 are semantic
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 spec
On Sat, Aug 9, 2014 at 12:20 PM, Alexander Belopolsky
wrote:
>
> On Sat, Aug 9, 2014 at 1:08 AM, Steven D'Aprano 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
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 usi
On Sat, Aug 9, 2014 at 1:08 AM, Steven D'Aprano 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 probably have a
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 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
https://mail.python.org/mailman/listinfo
On Sat, Aug 9, 2014 at 3:08 AM, Stephen J. Turnbull
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 in in x; y+= x
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 9 August 2014 06:08, Steven D'Aprano 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 seconds
>
>
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 defi
15 matches
Mail list logo