[Python-ideas] improve compatibility