Naming Conventions, Where's the Convention Waldo?

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Sun Jul 11 20:06:15 EDT 2010


On Sun, 11 Jul 2010 01:30:36 -0700, rantingrick wrote:

> On Jul 11, 3:03 am, "Günther Dietrich" <gd.use... at spamfence.net> wrote:
> 
>> So, it is not a disadvantage that the functions you listed above are
>> named in this way. In the contrary, it is an advantage, as it keeps
>> newcomers from using stupid variable names.
> 
> "int" for an Integer is stupid?
> "list" for a List is stupid?
> "str" for a String is stupid?
> 
> What am i missing?

If you're going to use generic names, why type three or four letters when 
one will do?

i, j, k, m, n, p, q for ints.
L, a, b, x for lists
s, t, a, b for strings.

If you don't want to use generic names, then int, list, str are useless 
because they don't mean anything. You need something like:

count_of_widgets
list_of_widgets
description




-- 
Steven



More information about the Python-list mailing list