strict python?
Christopher A. Craig
com-nospam at ccraig.org
Mon Dec 10 08:27:44 EST 2001
ssthapa at classes.cs.uchicago.edu (Suchandra Thapa) writes:
> I would really object to that. I use expressions
> like self.func to refer to functions and to create function
> lookups all the time. E.g. returning self.func so that
> the it can be used later as a callback or some other function.
I think you missed the point. The original point was not that Python
should raise a warning when a function is referenced, but not called.
It was, rather, that a warning should be raised when a function is
referenced, but the reference is then ignored.
i.e. "def foo(self): self.func" would raise a warning, but "def
foo(self): return self.func" would not.
--
Christopher A. Craig <com-nospam at ccraig.org>
More information about the Python-list
mailing list