Le mardi 23 octobre 2012 18:41:45 UTC+2, Ian a écrit :
On Tue, Oct 23, 2012 at 12:47 AM, wxjmfa...@gmail.com wrote:
In any case, have you been following the progress of issue 16061?
There is a patch for the str.replace regression that you identified,
which results in better
On 24/10/2012 10:32, wxjmfa...@gmail.com wrote:
Le mardi 23 octobre 2012 18:41:45 UTC+2, Ian a écrit :
On Tue, Oct 23, 2012 at 12:47 AM, wxjmfa...@gmail.com wrote:
In any case, have you been following the progress of issue 16061?
There is a patch for the str.replace regression that you
Le mardi 23 octobre 2012 06:59:49 UTC+2, rusi a écrit :
On Oct 22, 9:19 pm, rusi rustompm...@gmail.com wrote:
On 10/21/2012 11:33 AM, Vincent Davis wrote:
I am looking for a good way to get every pair from a string. For example,
input:
x = 'apple'
output
'ap'
On 2012-10-23, wxjmfa...@gmail.com wxjmfa...@gmail.com wrote:
Why bother with speeed?
Because the differences between O(N), O(log(N)) and O(N ** 2)
operations are often relevant.
A Python string replace function experiencing a slow-down from
previous versions doesn't absolve me from making
On 23/10/2012 07:47, wxjmfa...@gmail.com wrote:
Why bother with speeed?
The latest Python version is systematically slower
than the previous ones as soon as one uses non ascii
strings.
Python users are discussing code optimizations without
realizing the tool they are using, has killed itself
On Tue, Oct 23, 2012 at 12:47 AM, wxjmfa...@gmail.com wrote:
The latest Python version is systematically slower
than the previous ones as soon as one uses non ascii
strings.
No, it isn't. You've previously demonstrated a *microbenchmark* where
3.3 is slower than 3.2. This is a far cry from
On 10/21/2012 9:19 PM, Ian Foote wrote:
On 22/10/12 09:03, Emile van Sebille wrote:
So, as OP's a self confessed newbie asking about slicing, why provide an
example requiring knowledge of tee, enumerate, next and izip?
Because not only the newbie will read the thread? I for one was
On 10/21/2012 11:33 AM, Vincent Davis wrote:
I am looking for a good way to get every pair from a string. For example,
input:
x = 'apple'
output
'ap'
'pp'
'pl'
'le'
Maybe zip before izip for a noob?
s=apple
[a+b for a,b in zip(s, s[1:])]
['ap', 'pp', 'pl', 'le']
--
rustompm...@gmail.com
Date: 22 October 2012 17:19:35 IST
To: python-list@python.org
Subject: Re: get each pair from a string.
On 10/21/2012 11:33 AM, Vincent Davis wrote:
I am looking for a good way to get every pair from a string. For
example,
input:
x = 'apple'
output
'ap'
'pp'
'pl'
'le'
Maybe
On Oct 22, 9:19 pm, rusi rustompm...@gmail.com wrote:
On 10/21/2012 11:33 AM, Vincent Davis wrote:
I am looking for a good way to get every pair from a string. For example,
input:
x = 'apple'
output
'ap'
'pp'
'pl'
'le'
Maybe zip before izip for a noob?
s=apple
[a+b for a,b
I am looking for a good way to get every pair from a string. For example,
input:
x = 'apple'
output
'ap'
'pp'
'pl'
'le'
I am not seeing a obvious way to do this without multiple for loops, but
maybe there is not :-)
In the end I am going to what to get triples, quads... also.
Thanks
Vincent
On 10/21/2012 11:33 AM, Vincent Davis wrote:
I am looking for a good way to get every pair from a string. For example,
input:
x = 'apple'
output
'ap'
'pp'
'pl'
'le'
I am not seeing a obvious way to do this without multiple for loops, but
maybe there is not :-)
In the end I am going to what to
On Sun, Oct 21, 2012 at 12:33 PM, Vincent Davis
vinc...@vincentdavis.net wrote:
I am looking for a good way to get every pair from a string. For example,
input:
x = 'apple'
output
'ap'
'pp'
'pl'
'le'
I am not seeing a obvious way to do this without multiple for loops, but
maybe there is
@Emile,
I feel a little stupid, in my mind it was more difficult than in reality.
x = 'apple'
for f in range(len(x)-1):
print(x[f:f+2])
@Ian,
Thanks for that I was just looking in to that. I wonder which is faster I
have a large set of strings to process. I'll try some timings if I get a
On 21/10/2012 19:33, Vincent Davis wrote:
I am looking for a good way to get every pair from a string. For example,
input:
x = 'apple'
output
'ap'
'pp'
'pl'
'le'
I am not seeing a obvious way to do this without multiple for loops, but
maybe there is not :-)
In the end I am going to what to get
On 10/21/2012 11:51 AM, Ian Kelly wrote:
On Sun, Oct 21, 2012 at 12:33 PM, Vincent Davis
vinc...@vincentdavis.net wrote:
I am looking for a good way to get every pair from a string. For example,
input:
x = 'apple'
output
'ap'
'pp'
'pl'
'le'
I am not seeing a obvious way to do this without
On Sun, Oct 21, 2012 at 12:58 PM, Vincent Davis
vinc...@vincentdavis.net wrote:
x = 'apple'
for f in range(len(x)-1):
print(x[f:f+2])
@Ian,
Thanks for that I was just looking in to that. I wonder which is faster I
have a large set of strings to process. I'll try some timings if I get a
On 10/21/2012 12:06 PM, Ian Kelly wrote:
On Sun, Oct 21, 2012 at 12:58 PM, Vincent Davis
vinc...@vincentdavis.net wrote:
x = 'apple'
for f in range(len(x)-1):
print(x[f:f+2])
@Ian,
Thanks for that I was just looking in to that. I wonder which is faster I
have a large set of strings to
On 21 October 2012 19:33, Vincent Davis vinc...@vincentdavis.net wrote:
I am looking for a good way to get every pair from a string. For example,
input:
x = 'apple'
output
'ap'
'pp'
'pl'
'le'
I am not seeing a obvious way to do this without multiple for loops, but
maybe there is not
2012/10/21 Vincent Davis vinc...@vincentdavis.net:
I am looking for a good way to get every pair from a string. For example,
input:
x = 'apple'
output
'ap'
'pp'
'pl'
'le'
I am not seeing a obvious way to do this without multiple for loops, but
maybe there is not :-)
In the end I am
@vbr
Thats interesting. I would never have come up with that.
Vincent
On Sun, Oct 21, 2012 at 3:48 PM, Vlastimil Brom vlastimil.b...@gmail.comwrote:
vbr
--
http://mail.python.org/mailman/listinfo/python-list
To All,
I appreciate the range of answers and the time each of you take to think
about and answer my question. Whether or not I use them I find them all
educational.
Thanks again.
Vincent
On Mon, Oct 22, 2012 at 2:03 AM, Emile van Sebille em...@fenx.com wrote:
On 10/21/2012 12:06 PM, Ian
On 22/10/12 09:03, Emile van Sebille wrote:
So, as OP's a self confessed newbie asking about slicing, why provide an
example requiring knowledge of tee, enumerate, next and izip?
Because not only the newbie will read the thread? I for one was
interested to see all the different possible
23 matches
Mail list logo