Re: [Python-Dev] [Python-checkins] cpython: Avoid useless "++" at the end of functions

2011-05-26 Thread Victor Stinner
Le jeudi 26 mai 2011 à 08:13 -0400, Eric Smith a écrit : > If you're ever going to add code at the end of these functions, it's > unlikely you'll remember that you need to add these increments back in. You don't have to remember. Test the result of the function, it will not give the expected outpu

Re: [Python-Dev] [Python-checkins] cpython: Avoid useless "++" at the end of functions

2011-05-26 Thread Eric Smith
On 5/26/2011 8:32 AM, Victor Stinner wrote: > Le jeudi 26 mai 2011 à 08:13 -0400, Eric Smith a écrit : >> If you're ever going to add code at the end of these functions, it's >> unlikely you'll remember that you need to add these increments back in. > > You don't have to remember. Test the result

Re: [Python-Dev] [Python-checkins] cpython: Avoid useless "++" at the end of functions

2011-05-26 Thread Benjamin Peterson
2011/5/26 Victor Stinner : > Le jeudi 26 mai 2011 à 08:13 -0400, Eric Smith a écrit : >> If you're ever going to add code at the end of these functions, it's >> unlikely you'll remember that you need to add these increments back in. > > You don't have to remember. Test the result of the function, i

Re: [Python-Dev] [Python-checkins] cpython: Avoid useless "++" at the end of functions

2011-05-26 Thread Eric Smith
On 5/26/2011 10:34 AM, Ronald Oussoren wrote: > > On 26 May, 2011, at 16:10, Eric Smith wrote: >> >> >>> and make silent the Clang Static Analyzer :-) >> >> I care less about that than maintainability and future-proofing. > > Have to looked at the patch? The patch and resulting code look sane to

Re: [Python-Dev] [Python-checkins] cpython: Avoid useless "++" at the end of functions

2011-05-26 Thread Ronald Oussoren
On 26 May, 2011, at 16:10, Eric Smith wrote: > > >> and make silent the Clang Static Analyzer :-) > > I care less about that than maintainability and future-proofing. Have to looked at the patch? The patch and resulting code look sane to me, and if anything at most of the updated segments loo

Re: [Python-Dev] [Python-checkins] cpython: Avoid useless "++" at the end of functions

2011-05-26 Thread Terry Reedy
On 5/26/2011 10:34 AM, Ronald Oussoren wrote: On 26 May, 2011, at 16:10, Eric Smith wrote: and make silent the Clang Static Analyzer :-) I care less about that than maintainability and future-proofing. Have to looked at the patch? The patch and resulting code look sane to me, and if a

Re: [Python-Dev] [Python-checkins] cpython: Avoid useless "++" at the end of functions

2011-05-26 Thread Guido van Rossum
On Thu, May 26, 2011 at 10:59 AM, Terry Reedy wrote: > On 5/26/2011 10:34 AM, Ronald Oussoren wrote: >> >> On 26 May, 2011, at 16:10, Eric Smith wrote: >>> >>> and make silent the Clang Static Analyzer :-) >>> >>> I care less about that than maintainability and future-proofing. > > >> Have to

Re: [Python-Dev] [Python-checkins] cpython: Avoid useless "++" at the end of functions

2011-05-26 Thread Alexander Belopolsky
On Thu, May 26, 2011 at 11:26 AM, Eric Smith wrote: .. >> Have to looked at the patch? The patch and resulting code look sane to me, >> and >> if anything at most of the updated segments look cleaner after the patch. > > I have looked at it. I think the code was better before the patch. If I > we

Re: [Python-Dev] cpython: Avoid useless "++" at the end of functions

2011-05-26 Thread Terry Reedy
On 5/26/2011 2:08 PM, Guido van Rossum wrote: Sorry to butt in here, but I agree with Eric that it was better before. There is a common idiom, *pointer++ =, and whenever you see that you know that you are appending something to an output buffer. Perhaps the most important idea here is that this

Re: [Python-Dev] cpython: Avoid useless "++" at the end of functions

2011-05-26 Thread Benjamin Peterson
2011/5/26 Terry Reedy : > On 5/26/2011 2:08 PM, Guido van Rossum wrote: > >> Sorry to butt in here, but I agree with Eric that it was better >> before. There is a common idiom, *pointer++ =, and >> whenever you see that you know that you are appending something to an >> output buffer. Perhaps the m

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-26 Thread Sandro Tosi
On Wed, May 25, 2011 at 15:58, Antoine Pitrou wrote: > On Wed, 25 May 2011 09:41:46 -0400 > Barry Warsaw wrote: >> I think it would be a nice feature, and I can see the conflict.  OT1H you >> want >> to keep os.chown() a thin wrapper, but OTOH you'd rather not have to add a >> new, arguably more