1.1 --- a/translator.py Mon May 01 23:35:01 2017 +0200
1.2 +++ b/translator.py Fri Jun 16 00:37:50 2017 +0200
1.3 @@ -848,6 +848,12 @@
1.4 for name in self.importer.function_parameters.get(function_name):
1.5 self.generate_guard(name)
1.6
1.7 + # Also support self in methods, since some mix-in methods may only work
1.8 + # with certain descendant classes.
1.9 +
1.10 + if self.in_method():
1.11 + self.generate_guard("self")
1.12 +
1.13 # Produce the body and any additional return statement.
1.14
1.15 expr = self.process_structure_node(n.code) or \