Just magic ...

Armin Steinhoff a-steinhoff at web.de
Thu Apr 1 15:38:43 EST 2004


Hi all,

I'm just porting a piece of python code for using a different
database.
When I run the original version .. the type of 'set' is a tuple ...
and is magically in the new version a 'class instance'. The code is
the same in both versions:

ins_list = [(0,1,2,3),]
self.IMpos =0
for set in ins_list:
    setdata = (self.IMpos,) +  set[1:]

Any ideas why set is treated as a 'tuple' and in the other case as a
'class instance' ??  (Python 2.3.3 )


Regards

    Armin



More information about the Python-list mailing list