2011/10/25 Diego Barrera <diegonebarr...@yahoo.it
    non riesco ad impostare un test tipo

            if type(x) is IntType:
                faiqualcosa()
                return
            elif type(x) is LongType:
                faiqualcosaltro()
                return
            elif type(x) is FloatType:
                faiqualcosaltroancora()
                return


Python 3.1 sulla mia macchina

>>type(1) is int
True

>>class a:
...   pass
>>b = a()
>>type(b) == a
True

Questo ad una prima occhiata, può essere utile?



--
Wyrmskull
_______________________________________________
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python

Reply via email to