Author ncoghlan
Recipients Rodolpho.Eckhardt, eric.araujo, gvanrossum, ncoghlan, pitrou, rbp, zbysz
Date 2010-11-21.03:04:00
SpamBayes Score 2.53178e-08
Marked as misclassified No
Message-id <1290308642.77.0.644083435355.issue10220@psf.upfronthosting.co.za>
In-reply-to
Content
I'll actually go with version 1 of the patch as far as the variable initialisation goes. Yes, it is fractionally slower, but you get a maintenance gain from the fact that the enum values are guaranteed to be orthogonal, and this is clearly obvious to the reader.

When you write the assignments out explicitly, the reader has to actually look at the assigned values to determine whether or not the same value is ever assigned twice.

(No need to post a modified patch - I'll fix it before I check it in)
History
Date User Action Args
2010-11-21 03:04:02ncoghlansetrecipients: + ncoghlan, gvanrossum, pitrou, rbp, eric.araujo, zbysz, Rodolpho.Eckhardt
2010-11-21 03:04:02ncoghlansetmessageid: <1290308642.77.0.644083435355.issue10220@psf.upfronthosting.co.za>
2010-11-21 03:04:00ncoghlanlinkissue10220 messages
2010-11-21 03:04:00ncoghlancreate