is python Object oriented??

Steven D'Aprano steven at REMOVE.THIS.cybersource.com.au
Thu Jan 29 22:31:28 EST 2009


On Thu, 29 Jan 2009 02:25:57 -0800, Chris Rebert wrote:

> In addition to methods, Python has functions, which are not associated
> with a class 

Yes they are.

>>> (lambda: None).__class__
<type 'function'>

The function type itself has a class:

>>> (lambda: None).__class__.__class__
<type 'type'>


-- 
Steven



More information about the Python-list mailing list