Python decorators seem to be in the latest python, at least:
http://docs.python.org/ref/function.html
The discussion Tom linked to was back in 2004.
Decorators would be perfect for this, I think:
@Gdb.interactive (Gdb.Expr, Gdb.Expr)
def strcmp (str1, str2):
// compare strings
Easy squeezy.