class scope

David N. Richards (richards@aaron.music.qc.edu)
Mon, 25 Jul 1994 23:04:35 -0500 (GMT-0500)

I am a bit confused with class scope (newbie). Given the
following class definition:

class abc:
list = ['a', 'b', 'c']
def printInfo(arg):
x = 0
while x < len(list): # <== this as you know will yield an error
print type[x] # TypeError: len() of unsized object
x = x + 1 # I know it works if I say len(abc.list)

But isn't 'list' within scope of the class definition??
Must I use the 'abc.list' notation within the class definition
or am I missing something?
Sorry if this is very obvious!!
Dave

==========================================
David Richards
The Aaron Copland School of Music
at Queens College
E-mail: richards@aaron.music.qc.edu
Voice : 1-(718)-997-3874
==========================================