Feed type() depending on python version