import objc |
gives this:
Help on class ivar in module __builtin__: |
So, as we might have expected, when we call ivar("x","i"), the i refers to the object's type (int). The reason all this is needed is that in Key-Value coding, accessor functions for an object named "x" should be named "x" and "getX." The name duplication is somehow OK in Objective C but not in Python, and objc.ivar somehow makes this work.