list element of a class with the for statement
cedric_briner
briner at infomaniak.ch
Tue Mar 26 03:50:03 EST 2002
hi,
I'm interesting to know which method of a class I have to define to
list the __records of this class:
class CRdb:
__fieldsName= []
__keyname= []
__records = ['first','secnd','third']
__iRecord= 0
because I would like to write something like:
db=CRdb()
for entry in db:
print entry
and then get
first
secnd
third
please let me know any pointer refering this topic...or even better a
quick solution ..
thanks. Briner
More information about the Python-list
mailing list