Newbie question on Classes
Steven Clark
steven.p.clark at gmail.com
Thu Jan 10 17:32:12 EST 2008
> 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.
>From http://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."
More information about the Python-list
mailing list