Fix problem with list.clear in Python 3.2