2017-03-20 | Paul Boddie | raw files shortlog changelog graph | Handle functions in the always_callable method. | |
translator.py (file) |
1.1 --- a/translator.py Mon Mar 20 18:28:00 2017 +0100 1.2 +++ b/translator.py Mon Mar 20 19:07:01 2017 +0100 1.3 @@ -1320,8 +1320,9 @@ 1.4 return False 1.5 1.6 for ref in refs: 1.7 - if not self.importer.get_attributes(ref, "__fn__"): 1.8 + if not ref.has_kind("<function>") and not self.importer.get_attributes(ref, "__fn__"): 1.9 return False 1.10 + 1.11 return True 1.12 1.13 def need_default_arguments(self, objpath, nargs):