
Aug. 26, 2008
1:02 a.m.
Bruce Leban wrote:
If I could write:
class foo: def self.bar(): self.rebar(self.babar)
then the call to object.bar() would match the declaration.
I would rather reserve that syntax for a possible future enhancement to allow the target of a def statement to be a more general lvalue. It's been suggested e.g. that it would be handy to be able to create tables of functions using things like def funcs[5](x, y): ... If that were allowed, then def a.b() would logically have the meaning of defining a function b as an attribute of a. -- Greg