Do I always have to write "self." ?

Steve Crane craniac at datapro.co.za
Sun Apr 30 11:09:52 EDT 2000


On Sun, Apr 30, 2000 at 02:08:00PM +0000, Louis M. Pecora wrote:

> Isn't this called something like "Hungarian" variable naming?

Hungarian Notation was introduced by Charles Simonyi (who happened to
work for Microsoft).  In it's initial form it used a prefix to indicate
the data type of the variable but not the scope.  Later people started
to add a scope prefix but I don't think that Microsoft uses this as a
standard.

While it may seem to make code harder to read it is in fact very useful
when working on large projects involving may programmers.  However if
you're writing a program yourself and don't think that anyone else will
ever have to read the code you can probably steer clear of Hungarian
Notation in either form.

For an explanation of the notation by Charles Simonyi himself, see
http://msdn.microsoft.com/library/techart/hunganotat.htm.
-- 
Steve Crane
http://craniac.daveworld.org




More information about the Python-list mailing list