python: Extend SWIG gpgme_{sub,}key with a repr method.
* lang/python/gpgme.i: Added a genericrepr macro and use it for gpgme_key, gpgme_subkey, and gpgme_key_sig.
To look nicer in Python's REPL.
We define a generic repr as a SWIG macro and use that to extend some
defined SWIG objects.
The alternative would have been to write a custom repr function for
each class but that would need to be changed everytime the object's
structure changes. The bindings should be easy to maintain, I guess.
This comes at the expense that the reprs are now relatively long and
contain, for example, both keyid and fingerprint.
- Signed-off-by: Tobias Mueller <muelli@cryptobitch.de>