Case sensitivity redux -- with measurements!

Dieter Maurer dieter at handshake.de
Sat May 27 04:34:29 EDT 2000


neelk at brick.cswv.com (Neel Krishnaswami) writes on 25 May 2000 02:00:55 GMT:
Thank you for "casechecker".

> Out of ~36K lines of Python code in 137 modules, there were 12,243
> named identifiers. There were 35 ambiguous identifiers, and there were
> never more than 2 versions of the same name.
I applied it to my code: 8450 names; 67 collisions.

Most of them are purposeful, resulting from naming conventions:

  Constants:		all uppercase
  Classes:		starting with uppercase letter
  functions/methods:	starting with lowercase letter
  objects:		usually short, all lowercase names,
			  preferable similar to the class name.

"Collisions" make up for less than one percent in my code, but I would like 
not to consider them collisions but useful naming of related objects.

Dieter



More information about the Python-list mailing list