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.
548k questions
547k answers
4 comments
86.3k users