You need to call self.a() to invoke a from b. a is not a global function, it is a method on the class.
self.a()
a
b
You may want to read through the Python tutorial on classes some more to get the finer details down.
2.1m questions
2.1m answers
60 comments
57.0k users