Changed dependency test.

Converted to use actual method rather than a builtin.
Changed code to use method over builtin.

This means that the buildin comparison is back to normal simple
checking, which is good.

Also split repr over a couple of lines.