Checking whether bool is a type
Christos TZOTZIOY Georgiou
tzot at sil-tec.gr
Sun Jul 27 23:41:39 CEST 2003
On Sun, 27 Jul 2003 23:22:58 +0200, rumours say that Jan Decaluwe
<jan at jandecaluwe.com> might have written:
>In my application I need to know whether bool is
>available as a type (in Python2.3) or not. I just
>realized I can use the following:
>>> type(bool) is type
You might like to do this as an alternative:
return isinstance(bool, type)
to catch older python versions as well.
TZOTZIOY, I speak England very best,
Microsoft Security Alert: the Matrix began as open source.
More information about the Python-list