Re: 2to3 refactoring [was Re: Tuple parameter unpacking in 3.x]

2008-10-11 Thread Aaron "Castironpi" Brady
On Oct 11, 2:23 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: snip > I am talking about a clash between *conventions*, where there could be > many argument names of the form a_b which are not intended to be two item > tuples. > > In Python 2.x, when you see the function signatur

Re: 2to3 refactoring [was Re: Tuple parameter unpacking in 3.x]

2008-10-11 Thread MRAB
On Oct 11, 8:23 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sun, 05 Oct 2008 17:15:27 +0200, Peter Otten wrote: > > Steven D'Aprano wrote: > > >> PEP 3113 offers the following recommendation for refactoring tuple > >> arguments: > > >> def fxn((a, (b, c))): > >>     pass

Re: 2to3 refactoring [was Re: Tuple parameter unpacking in 3.x]

2008-10-11 Thread Steven D'Aprano
On Sun, 05 Oct 2008 17:15:27 +0200, Peter Otten wrote: > Steven D'Aprano wrote: > >> PEP 3113 offers the following recommendation for refactoring tuple >> arguments: >> >> def fxn((a, (b, c))): >> pass >> >> will be translated into: >> >> def fxn(a_b_c): >> (a, (b, c)) = a_b_c >> p

Re: 2to3 refactoring [was Re: Tuple parameter unpacking in 3.x]

2008-10-06 Thread Harald Luessen
On Sun, 05 Oct 2008 "Aaron \"Castironpi\" Brady" wrote: >There's the possibility that the most important words should go first in >this case: > >result_flag__t > >But, I'll admit that other people could have learned different orders of >scanning words than I, especially depending on their spoken

Re: 2to3 refactoring [was Re: Tuple parameter unpacking in 3.x]

2008-10-05 Thread Peter Otten
Steven D'Aprano wrote: > PEP 3113 offers the following recommendation for refactoring tuple > arguments: > > def fxn((a, (b, c))): > pass > > will be translated into: > > def fxn(a_b_c): > (a, (b, c)) = a_b_c > pass > > and similar renaming for lambdas. > http://www.python.org/dev/

Re: 2to3 refactoring [was Re: Tuple parameter unpacking in 3.x]

2008-10-05 Thread Aaron "Castironpi" Brady
Steven D'Aprano wrote: PEP 3113 offers the following recommendation for refactoring tuple arguments: def fxn((a, (b, c))): pass will be translated into: def fxn(a_b_c): (a, (b, c)) = a_b_c pass and similar renaming for lambdas. http://www.python.org/dev/peps/pep-3113/ I'd lik

2to3 refactoring [was Re: Tuple parameter unpacking in 3.x]

2008-10-05 Thread Steven D'Aprano
PEP 3113 offers the following recommendation for refactoring tuple arguments: def fxn((a, (b, c))): pass will be translated into: def fxn(a_b_c): (a, (b, c)) = a_b_c pass and similar renaming for lambdas. http://www.python.org/dev/peps/pep-3113/ I'd like to suggest that this nam