def map_attr(self, mapping, attr, obj):
if attr not in mapping and hasattr(self, attr):<EOL><INDENT>if not callable(getattr(self, attr)):<EOL><INDENT>mapping[attr] = getattr(self, attr)<EOL><DEDENT>else:<EOL><INDENT>mapping[attr] = getattr(self, attr)(obj)<EOL><DEDENT><DEDENT>
A kind of cheesy method that allows for callables or attributes to
be used interchangably