RSS michelepasin.org / code, music, words

Words / blog / 6 January 2009

Python's phenotype


Phenotype: any observable characteristic or trait of an organism: such as its morphology, development, biochemical or physiological properties, or behavior.

>>> type('aaa') 
<type 'str'> 
>>> type('aaa') == type('a') 
True 
>>> type(type('aaa') == type('a')) 
<type 'bool'> 
>>> type(type(type('aaa') == type('a'))) 
<type 'type'> 
>>> type(type(type(type('aaa') == type('a')))) 
<type 'type'> 
>>> type(type(type(type(type('aaa') == type('a'))))) 
<type 'type'>

If you don’t know what’s going on, I’ve just been fooling around with python's type system and IDLE

Michele Pasin. Python's phenotype. Blog post on www.michelepasin.org. Published on Jan. 6, 2009.

2009