Fix extend only works in python 2.7