Hungarian Notation

inhahe inhahe at gmail.com
Tue May 27 02:42:42 EDT 2008


Well, I just need it once in a while.  Actually now is the only time I 
remember.  The last time what I needed was a file name extension.  I want a 
string called headers, but I want to derive a dict from it, also called 
headers.  So I figured the string would be called strHeaders, and the dict, 
dctHeaders probably, but when a precedent for something like that exists, I 
like to use it.

"Kam-Hung Soh" <kamhung.soh at gmail.com> wrote in message 
news:mailman.1634.1211868017.12834.python-list at python.org...
> inhahe 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.
>
> I used simple Hungarian notation when I started programming in Python 
> (e.g. "s" for strings, "l" for lists, "d" for dictionaries).  As my 
> programming style became more "Pythonic" and I chose better variable 
> names, I stopped using Hungarian notation.
>
> YMMV.
>
> -- 
> Kam-Hung Soh <a href="http://kamhungsoh.com/blog">Software Salariman</a>
> 





More information about the Python-list mailing list