> Looking over the code base, frozensets are used rarely. > So I don't think this is warranted.
There is no shortage for perfect use cases in the form: if urlext in {'html', 'xml', 'php'}: . . . If the curly braces are taken to mean a frozenset, then the peepholer can code the whole thing as a compile time constant. It is fast and clean. You need not even be aware that you're using a frozenset. The use cases for set literals lean *heavily* toward situtations where the set doesn't get mutated. It would be nice if all that code got optimized down to a compile time constant. The cases for literals differ quite a bit from general, dynamically formed sets. I see little advantage for {'html', 'xml', 'php'} being mutable. Raymond _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com