Python Macros

Alex Martelli aleaxit at yahoo.com
Wed Oct 6 04:24:45 EDT 2004


G. S. Hayes <sjdevnull at yahoo.com> wrote:
   ...
>     def __getattr__(self, attr):
>         if not hasattr(self, attr):

redundant: hasattr(self, attr) will ALWAYS be false here, or else
__getattr__ wouldn't have been entered in the first place.


Alex



More information about the Python-list mailing list