Hungarian Notation
George Sakkis
george.sakkis at gmail.com
Tue May 27 15:16:41 EDT 2008
On May 27, 3:43 am, Paddy <paddy3... at googlemail.com> wrote:
> On May 27, 7:42 am, "inhahe" <inh... at gmail.com> wrote:
>
> > 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.... at gmail.com> wrote in message
>
> I have a my own sometime used convention od using dict names that
> mirror
> what is being mapped to what, so a dict mapping headers to body might
> be called head2body, in general a mapping from x to y I might call
> x2y.
I use the same convention, though it's less than ideal if x or y
consist of more than one word (typically joined with underscore), e.g.
"value2row_id" or if the values are also dicts
("category2value2instances").
George
More information about the Python-list
mailing list