Re: [Python-Dev] str.lstrip bug?

2015-03-10 Thread Isaac Schwabacher
On 15-03-10, Ethan Furman wrote: > On 03/10/2015 10:57 AM, Isaac Schwabacher wrote: > > On 15-03-10, Facundo Batista wrote: > >> On Tue, Mar 10, 2015 at 2:27 PM, lou xiao wrote: > >> > >>> tiny➜ ~ python > >>> Python 2.7.5+ (default, Feb 27 2014, 19:37:08) > >>> [GCC 4.8.1] on linux2 > >>> Type "h

Re: [Python-Dev] str.lstrip bug?

2015-03-10 Thread Ethan Furman
On 03/10/2015 10:57 AM, Isaac Schwabacher wrote: > On 15-03-10, Facundo Batista wrote: >> On Tue, Mar 10, 2015 at 2:27 PM, lou xiao wrote: >> >>> tiny➜ ~ python >>> Python 2.7.5+ (default, Feb 27 2014, 19:37:08) >>> [GCC 4.8.1] on linux2 >>> Type "help", "copyright", "credits" or "license" for mor

Re: [Python-Dev] str.lstrip bug?

2015-03-10 Thread Florian Bruhin
* lou xiao [2015-03-11 01:27:21 +0800]: > I find a bug in str.lstrip, when i call str.lstrip, i get this result. You're misunderstanding how str.strip works. It takes a set of characters and removes them all from the beginning: >>> "abababcd".lstrip('ab') >>> 'cd' Florian -- http://ww

Re: [Python-Dev] str.lstrip bug?

2015-03-10 Thread lou xiao
ths, i misunderstood the method 2015-03-11 1:33 GMT+08:00 Chris Angelico : > On Wed, Mar 11, 2015 at 4:27 AM, lou xiao wrote: > > I find a bug in str.lstrip, when i call str.lstrip, i get this result. > > > > tiny➜ ~ python > > Python 2.7.5+ (default, Feb 27 2014, 19:37:08) > > [GCC 4.8.1] on li

Re: [Python-Dev] str.lstrip bug?

2015-03-10 Thread Chris Angelico
On Wed, Mar 11, 2015 at 4:27 AM, lou xiao wrote: > I find a bug in str.lstrip, when i call str.lstrip, i get this result. > > tiny➜ ~ python > Python 2.7.5+ (default, Feb 27 2014, 19:37:08) > [GCC 4.8.1] on linux2 > Type "help", "copyright", "credits" or "license" for more information. a='dev

Re: [Python-Dev] str.lstrip bug?

2015-03-10 Thread Facundo Batista
On Tue, Mar 10, 2015 at 2:27 PM, lou xiao wrote: > tiny➜ ~ python > Python 2.7.5+ (default, Feb 27 2014, 19:37:08) > [GCC 4.8.1] on linux2 > Type "help", "copyright", "credits" or "license" for more information. a='device_info' a.lstrip('device') > '_info' a.lstrip('device_') > 'nf

[Python-Dev] str.lstrip bug?

2015-03-10 Thread lou xiao
I find a bug in str.lstrip, when i call str.lstrip, i get this result. tiny➜ ~ python Python 2.7.5+ (default, Feb 27 2014, 19:37:08) [GCC 4.8.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> a='device_info' >>> a.lstrip('device') '_info' >>> a.lstrip('device_

Re: [Python-Dev] Tunning binary insertion sort algorithm in Timsort.

2015-03-10 Thread Tim Peters
OK - here's what the current binsort does, ignoring that it skips an already-sorted prefix (if any), and creating a new list instead of modifying in-place: def oldsort(a): from bisect import bisect_right as br assert a result = [a[0]] for i in range(1, len(a)):

Re: [Python-Dev] Thoughts on running Python 3.5 on Windows (path, pip install --user, etc)

2015-03-10 Thread Jim J. Jewett
On 10 March 2015 at slightly after midnight. Paul Moore wrote: > Personally I doubt it would make much difference. If the docs say > "pygmentize" I'm unlikely to dig around to find that the incantation > "python -m pygments.somemodule:main" does the same thing using 3 times > as many characters

Re: [Python-Dev] Windows installer - File associations in "per user" installs

2015-03-10 Thread Steve Dower
It's a bug. File and assign to me please. Top-posted from my Windows Phone From: Paul Moore Sent: ‎3/‎10/‎2015 3:35 To: Steve Dower Cc: Python Dev Subject: Windows installer

[Python-Dev] Windows installer - File associations in "per user" installs

2015-03-10 Thread Paul Moore
On 9 March 2015 at 15:37, Steve Dower wrote: >> Maybe the answer is that we simply start recommending that everyone on >> Windows >> uses per-user installs. It makes little difference to me (beyond the fact >> that >> when I want to look at the source of something in the stdlib, the location of