Message98437
Apologies if there is a way of doing this, but I haven't been able to find anything.
I need to be able to do the following:
my_tuple = namedtuple("my_tuple", "a b c")
obj = my_tuple(1,2,3)
if isinstance(obj, namedtuple):
.. do stuff ..
The best I could come up with for the moment is:
if isinstance(obj, tuple) and type(obj) is not tuple:
.. do stuff .. |
|
Date |
User |
Action |
Args |
2010-01-27 16:11:09 | pwaller | set | recipients:
+ pwaller |
2010-01-27 16:11:09 | pwaller | set | messageid: <1264608669.85.0.379125118171.issue7796@psf.upfronthosting.co.za> |
2010-01-27 16:11:08 | pwaller | link | issue7796 messages |
2010-01-27 16:11:08 | pwaller | create | |
|