Hungarian Notation

Paul McGuire ptmcg at austin.rr.com
Tue May 27 02:37:17 EDT 2008


On May 27, 12:28 am, "inhahe" <inh... at gmail.com> wrote:
> Does anybody know of a list for canonical prefixes to use for hungarian
> notation in Python?  Not that I plan to name all my variables with hungarian notation, but just for when it's appropriate.

You are likely to get some links to PEP 8 for coding style and naming
conventions, but it turns out PEP 8 doesn't really say yay or nay on
the Hungarian notation topic.

My own knee-jerk reaction was "Hungarian Notation Bad!" and googling
about for "python hungarian notation" led me through some like-minded
sites.  But I also found this entry on Joel Spolky's site (http://
www.joelonsoftware.com/printerFriendly/articles/Wrong.html), that
warns against tarring all Hungarian-type notations with the same
brush.

So with that article in mind, I'd have to ask, what do you mean by
"appropriate"?

-- Paul



More information about the Python-list mailing list