Is their an expression to create a class?

Paddy paddy3118 at googlemail.com
Tue Mar 17 17:13:56 EDT 2009


We the def statement and the lambda expression. We have the class
statement, but is their an expression to create a class?

Or:

>>> def F(): pass

>>> type(F)
<type 'function'>
>>> # Is to:
>>> F2 = lambda : none
>>> type(F2)
<type 'function'>
>>>
>>> # As
>>> class O(object): pass

>>> type(O)
<type 'type'>
>>> # is to:
>>> # ????

Thanks.

- Paddy.



More information about the Python-list mailing list