How to get class name in Python without triggering __getattribute__?