Make close(), and hence __del__(), robust in the light of the world being destroyed already.
Make close(), and hence __del__(), robust in the light of the world
being destroyed already.

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator