[Bf-python] Attribute casing

Stephen Swaney sswaney at centurytel.net
Sun Jul 31 19:14:51 CEST 2005


On Fri, Jul 29, 2005 at 11:12:16AM +0300, Yehoshua Sapir wrote:
> How should attributes be cased?
> 
> For my MTex patch 
> (https://projects.blender.org/tracker/index.php?func=detail&aid=2869&group_id=9&atid=127) 
> I have for example the following:
> 
> mtex.colfac (factor for color mixing)
> mtex.correctNor (the "correct nor" button)
> mtex.mtCol (mapto "Col" button)
> 
> Some thoughts:
> 
> - I remember reading somewhere on the wiki that to conform to Python, 
> everything should be cased like "correctNor".
> 
> - colFac looks odd and is slightly harder to type than colfac. Perhaps 
> it should be named "colFactor" or something like that anyway?

I rather like the mixedCase style for compound nouns.
Readability is more important than type-ability, to my mind, since
the code gets read much more than it gets written.

Using 'colFac' instead of 'colFactor' seems like a reasonable
abbreviation that doesn't lose too much if we know we are talking
about colors.

-- 
Stephen Swaney			
sswaney at centurytel.net




More information about the Bf-python mailing list