Alexander Belopolsky wrote: > 1. Do nothing: dicts are built incrementally, and sets in batch. > 2. Implement batch processing for dict literals. > 3. Implement incremental processing for sets.
My thought is that sets are the odd one out here. Tuples are created batchwise because, being immutable, that's the only way to do it. But if set literals are to produce mutable objects, there's no need for them to be created batchwise, and doing so has unfortunate stack size and memory use consequences in the worst case. Keep in mind that large set constructions are likely to be done at the module level, and if the module then goes on to call the main function of a program, that big stack frame is going to stay around for the life of the process. -- Greg _______________________________________________ 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