Backward compatibility for python 2.6

Removed set literals for 2.6 support.