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:
jand> python
Python 2.3c1 (#1, Jul 21 2003, 12:40:39)
[GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2
Type "help", "copyright" , "credits" or "license" for more information.[color=blue][color=green][color=darkred]
>>> type(bool) is type[/color][/color][/color]
True
jand> python2.2
Python 2.2.2 (#1, Oct 16 2002, 19:59:11)
[GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2
Type "help", "copyright" , "credits" or "license" for more information.[color=blue][color=green][color=darkred]
>>> type(bool) is type[/color][/color][/color]
0
Great isn't it ?! Not sure whether I should consider
this to be completely obvious or very deep ...
Regards, Jan
--
Jan Decaluwe - Resources bvba
Losbergenlaan 16, B-3010 Leuven, Belgium
mailto:jan@jand ecaluwe.com
available as a type (in Python2.3) or not. I just
realized I can use the following:
jand> python
Python 2.3c1 (#1, Jul 21 2003, 12:40:39)
[GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2
Type "help", "copyright" , "credits" or "license" for more information.[color=blue][color=green][color=darkred]
>>> type(bool) is type[/color][/color][/color]
True
jand> python2.2
Python 2.2.2 (#1, Oct 16 2002, 19:59:11)
[GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2
Type "help", "copyright" , "credits" or "license" for more information.[color=blue][color=green][color=darkred]
>>> type(bool) is type[/color][/color][/color]
0
Great isn't it ?! Not sure whether I should consider
this to be completely obvious or very deep ...
Regards, Jan
--
Jan Decaluwe - Resources bvba
Losbergenlaan 16, B-3010 Leuven, Belgium
mailto:jan@jand ecaluwe.com
Comment