2009/5/4 <bearophileh...@lycos.com>: > An idea-syntax: > > def fact(n): > return 1 if n <= 1 else n * inspect.self(n - 1) > > Or even a lambda, because you don't need the name anymore to call the > function: > > fact = lambda n: 1 if n <= 1 else n * self(n - 1)
How would it work with methods? class Foo: def fac(self, n): return 1 if n <= 1 else n * self.self(n-1) ?? -- mvh Björn -- http://mail.python.org/mailman/listinfo/python-list