[Tutor] First program

Alan Gauld alan.gauld at btinternet.com
Sat Mar 13 20:27:09 CET 2010

"Ray Parrish" <crp at cmc.net> wrote 

> As far as the capitalizations, it's just a habit I've held over from my 
> Visual Basic days, and earlier programming. It's a little easier for me 
> to pick out the individual words in a variable like ThisPerson as 
> opposed to thisperson. 

thisPerson is fine for a variable

ThisPerson implies to most Python progranmmers that it's a class.

> Is it actually supposed to be this_person? 

I think the official style guide says use underscores, 
I personally prefer the this{erson stule except where it 
is ambiguous. Underscores have the adbvantage of 
never being ambiguous - but they do involve extra typing...

Alan G.

More information about the Tutor mailing list