Re: [Python-Dev] cpython: fix compiler warning by implementing this more cleverly

2011-11-23 Thread Victor Stinner
Le Mercredi 23 Novembre 2011 01:49:28 Terry Reedy a écrit : > The one-liner could be followed by >assert(kind==1 || kind==2 || kind==4) > which would also serve to remind the reader of the possibilities. For a ready string, kind must be 1, 2 or 4. We might rename "kind" to "charsize" because

Re: [Python-Dev] cpython: fix compiler warning by implementing this more cleverly

2011-11-22 Thread Nick Coghlan
On Wed, Nov 23, 2011 at 4:49 PM, Terry Reedy wrote: > I personally strongly prefer the one-line formula to the hardcoded magic > numbers calculated from the formula. I find it much more readable. To me, > the only justification for the switch would be if there is a serious worry > about the kind b

Re: [Python-Dev] cpython: fix compiler warning by implementing this more cleverly

2011-11-22 Thread Terry Reedy
On 11/22/2011 7:42 PM, Benjamin Peterson wrote: 2011/11/22 Antoine Pitrou: On Tue, 22 Nov 2011 16:42:35 -0500 Benjamin Peterson wrote: 2011/11/22 Antoine Pitrou: On Tue, 22 Nov 2011 21:29:43 +0100 benjamin.peterson wrote: http://hg.python.org/cpython/rev/77ab830930ae changeset: 73697:77ab

Re: [Python-Dev] cpython: fix compiler warning by implementing this more cleverly

2011-11-22 Thread Antoine Pitrou
On Tue, 22 Nov 2011 19:42:24 -0500 Benjamin Peterson wrote: > 2011/11/22 Antoine Pitrou : > > On Tue, 22 Nov 2011 16:42:35 -0500 > > Benjamin Peterson wrote: > >> 2011/11/22 Antoine Pitrou : > >> > On Tue, 22 Nov 2011 21:29:43 +0100 > >> > benjamin.peterson wrote: > >> >> http://hg.python.org/cp

Re: [Python-Dev] cpython: fix compiler warning by implementing this more cleverly

2011-11-22 Thread Benjamin Peterson
2011/11/22 Antoine Pitrou : > On Tue, 22 Nov 2011 16:42:35 -0500 > Benjamin Peterson wrote: >> 2011/11/22 Antoine Pitrou : >> > On Tue, 22 Nov 2011 21:29:43 +0100 >> > benjamin.peterson wrote: >> >> http://hg.python.org/cpython/rev/77ab830930ae >> >> changeset:   73697:77ab830930ae >> >> user:  

Re: [Python-Dev] cpython: fix compiler warning by implementing this more cleverly

2011-11-22 Thread Antoine Pitrou
On Tue, 22 Nov 2011 16:42:35 -0500 Benjamin Peterson wrote: > 2011/11/22 Antoine Pitrou : > > On Tue, 22 Nov 2011 21:29:43 +0100 > > benjamin.peterson wrote: > >> http://hg.python.org/cpython/rev/77ab830930ae > >> changeset:   73697:77ab830930ae > >> user:        Benjamin Peterson > >> date:    

Re: [Python-Dev] cpython: fix compiler warning by implementing this more cleverly

2011-11-22 Thread Benjamin Peterson
2011/11/22 Antoine Pitrou : > On Tue, 22 Nov 2011 21:29:43 +0100 > benjamin.peterson wrote: >> http://hg.python.org/cpython/rev/77ab830930ae >> changeset:   73697:77ab830930ae >> user:        Benjamin Peterson >> date:        Tue Nov 22 15:29:32 2011 -0500 >> summary: >>   fix compiler warning by

Re: [Python-Dev] cpython: fix compiler warning by implementing this more cleverly

2011-11-22 Thread Antoine Pitrou
On Tue, 22 Nov 2011 21:29:43 +0100 benjamin.peterson wrote: > http://hg.python.org/cpython/rev/77ab830930ae > changeset: 73697:77ab830930ae > user:Benjamin Peterson > date:Tue Nov 22 15:29:32 2011 -0500 > summary: > fix compiler warning by implementing this more cleverly You