Data Types

Steven D'Aprano steve+comp.lang.python at pearwood.info
Wed Sep 21 01:21:16 EDT 2016


On Wednesday 21 September 2016 14:03, Cai Gengyang wrote:

> So for example for "bool" , it only applies to True/False and nothing else?

Correct. True and False are the only instances of the type 'bool'.

> (2 data types), i.e. :
> 
>>>> type(True)
> <class 'bool'>
>>>> type(False)
> <class 'bool'>
> 
> Are there any other data types that will give you type(A) or type(B) = <class
> 'bool'> besides True and False?

No.





-- 
Steven
git gets easier once you get the basic idea that branches are homeomorphic 
endofunctors mapping submanifolds of a Hilbert space.




More information about the Python-list mailing list