Do I always have to write "self." ?

Martijn Faassen m.faassen at vet.uu.nl
Mon May 1 10:11:40 EDT 2000


Samuel A. Falvo II <kc5tja at garnet.armored.net> wrote:
> It's cases like this that I choose to use hungarian notation:

> 	uint32 Evaluate( char *cmd, char *param1, char *param2 );

In what way is 'cmd' hungarian notation? There's no prefix anywhere, unless
it's all prefix. :)

If this is a discussion about having some conventions for names, I agree.

In Python, my lists (and sometimes dictionaries) tend to be plural forms
of nouns, for instances:

values = []
elephants = []

On occasion I also use:

valueList = []
elephantList = []
mouseDict = {}

Decidedly not Hungarian, but quite readable. In general I've found it doesn't
pay to be overly strict about this in Python -- I prefer naming things well,
and keeping functions and methods relatively short. This way I don't tend to
lose track about what some variable was referring to so easily, as it all
still fits in my limited 7 (plus or minus 2) short time memory.
 
Regards,

Martijn
-- 
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?



More information about the Python-list mailing list