How do you code in Python ???

Peter Hansen peter at engcorp.com
Fri May 17 19:07:54 EDT 2002


Byron Hammond wrote:
> 
> > Another one is which are "standard" coding [styles] in Python ?
> 
> I'm sure that including type information in the name of a variable could
> be a good idea if it was important to know the type. eg:
> nItemsSoFar = number of items so far (integer)
> sID = identification (string)
> cCar_Fast = instance of the car class. This is a fast one

Nooooo!!  Not Hungarian notation!  :-)

(Code with the above style is generally less readable than code
without.  This is probably a religious matter, but I believe few
coding standards would recommend the above naming conventions.)

-Peter



More information about the Python-list mailing list