A great deal of rigging is nothing more than setting up connections between attributes. Sometimes, those connections can be very direct, such as making sure that two joints are always in exactly the same position in world space, but in other times, something other than a direct one-to-one mapping is called for.
There are a few different ways to connect attributes in non-linear ways, including using Maya's set-driven key capability to map one arbitrary range of an attribute onto a different arbitrary range of another. In this example, we'll be looking at how to set that up with scripting.
Our example will set up the "Hello World" equivalent for using a set-driven key, a finger that curls all of its joints smoothly at the same time, allowing the animator to keyframe a single attribute per finger instead of three (or possibly even more).