On Sep 21, 5:21 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Ok, then what about classes ? They also are objects-like-any-other, > after all. So should we have this syntax too ? > > MyClass = class(ParentClass): > __init__ = function (self, name): > self.name = name > > ?-)
For consistency I would suggest this, but Python already does this! Foo = type('Foo', (object, ), {'bar': lambda self, bar: bar}) I've created a new class and then binded it to name afterwards. If you can import modules without special syntax and you can create classes without special syntax, why should functions be treated any differently? -- http://mail.python.org/mailman/listinfo/python-list