[Tutor] Stopping evalualtion of inner Lists/ tuples

Sharriff Aina NHYTRO@compuserve.com
Tue, 23 Jan 2001 05:42:14 -0500


Hi Guys!

Considering the following:

tab1 =3D {"feld1": "varchar", "feld2": "varchar"}
tab2 =3D {"feld3": "varchar", "feld4": "varchar"}
virtuallist =3D [tab1, tab2]

>>> vlist
[{'feld2': 'varchar', 'feld1': 'varchar'}, {'feld3': 'varchar', 'feld4':
'varchar'}]
>>> for x in vlist:
        print x
        =

{'feld2': 'varchar', 'feld1': 'varchar'}
{'feld3': 'varchar', 'feld4': 'varchar'}

>>> for x in vlist:
        print `x`

{'feld2': 'varchar', 'feld1': 'varchar'}
{'feld3': 'varchar', 'feld4': 'varchar'}

How can I stop the evaluation of the innner List or tuple? I would like t=
o
have

for tables in virtuallist:
    print tables

>>> tab1
        tab2

I=B4m trying to init my Gadfly database programmatically. I=B4ve got a la=
rge
list of tables and fields to create and I would=B4nt like to type all the=

"creates" per hand


Thanks


Sharriff