fix a tiny issue when checking virtual functions in class_list.cpp.py

I reported the symptom here: https://github.com/shogun-toolbox/shogun/issues/1505