Bengt Richter wrote:
The following shows nothing static anywhere, yet a class has been defined, an 
instance created, and
__init__ called with initial value, and the value retrieved as an attribute of 
the returned instance,
and it's all an expression.

 >>> type('C', (), {'__init__': lambda 
self,v:setattr(self,'foo',v)})('hello').foo
 'hello'

I have no idea what point you are trying to make, except maybe that it is possible to obfuscate a simple class definition.


Kenw
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to