Implement Basic::compare() and Basic::__cmp__()