Newbie question on Classes
Nanjundi
nanjundi at gmail.com
Fri Jan 11 14:02:43 EST 2008
On Jan 10, 5:32 pm, "Steven Clark" <steven.p.cl... at gmail.com> wrote:
> > l = []
> > l.append(man)
> > l.append(woman)
>
> > # Print the state.
> > for item in l:
> > print item.state()
>
> Small, off-topic nitpick:
> please don't use "l" (lower-case el) as a variable name.
>
> >Fromhttp://www.python.org/dev/peps/pep-0008/:
>
> "Naming Conventions
>
> Names to Avoid
>
> Never use the characters `l' (lowercase letter el), `O' (uppercase
> letter oh), or `I' (uppercase letter eye) as single character variable
> names.
>
> In some fonts, these characters are indistinguishable from the numerals
> one and zero. When tempted to use `l', use `L' instead."
Thanks for the PEP, Steven.
-N
More information about the Python-list
mailing list