Re: [Python-Dev] cpython (3.1): #2650: Refactor re.escape to use enumerate().

2011-03-26 Thread Ezio Melotti
On 27/03/2011 0.03, Georg Brandl wrote: On 26.03.2011 20:19, "Martin v. Löwis" wrote: Am 26.03.2011 20:00, schrieb Terry Reedy: On 3/26/2011 2:17 PM, Georg Brandl wrote: "Refactor" doesn't sound like it belongs in the 3.1 branch... -for i in range(len(pattern)): -c = patte

Re: [Python-Dev] cpython (3.1): #2650: Refactor re.escape to use enumerate().

2011-03-26 Thread Georg Brandl
On 26.03.2011 20:19, "Martin v. Löwis" wrote: > Am 26.03.2011 20:00, schrieb Terry Reedy: >> On 3/26/2011 2:17 PM, Georg Brandl wrote: >>> "Refactor" doesn't sound like it belongs in the 3.1 branch... >> -for i in range(len(pattern)): -c = pattern[i] +for

Re: [Python-Dev] cpython (3.1): #2650: Refactor re.escape to use enumerate().

2011-03-26 Thread Martin v. Löwis
Am 26.03.2011 20:00, schrieb Terry Reedy: > On 3/26/2011 2:17 PM, Georg Brandl wrote: >> "Refactor" doesn't sound like it belongs in the 3.1 branch... > >>> -for i in range(len(pattern)): >>> -c = pattern[i] >>> +for i, c in enumerate(pattern): > > I would call thin 'R

Re: [Python-Dev] cpython (3.1): #2650: Refactor re.escape to use enumerate().

2011-03-26 Thread Antoine Pitrou
On Sat, 26 Mar 2011 15:00:29 -0400 Terry Reedy wrote: > On 3/26/2011 2:17 PM, Georg Brandl wrote: > > "Refactor" doesn't sound like it belongs in the 3.1 branch... > > >> -for i in range(len(pattern)): > >> -c = pattern[i] > >> +for i, c in enumerate(pattern): > > I w

Re: [Python-Dev] cpython (3.1): #2650: Refactor re.escape to use enumerate().

2011-03-26 Thread Terry Reedy
On 3/26/2011 2:17 PM, Georg Brandl wrote: "Refactor" doesn't sound like it belongs in the 3.1 branch... -for i in range(len(pattern)): -c = pattern[i] +for i, c in enumerate(pattern): I would call thin 'Replace obsolete idiom in' rather than 'Refactor'. So are you

Re: [Python-Dev] cpython (3.1): #2650: Refactor re.escape to use enumerate().

2011-03-26 Thread Georg Brandl
"Refactor" doesn't sound like it belongs in the 3.1 branch... Georg On 25.03.2011 13:27, ezio.melotti wrote: > http://hg.python.org/cpython/rev/ed02db9921ac > changeset: 68924:ed02db9921ac > branch: 3.1 > user:Ezio Melotti > date:Fri Mar 25 14:19:30 2011 +0200 > summary: >