Paul Moore wrote: > One downside, which I only point out because someone will, is that > optimization opportunities will be lost for the usual reason - the > optimizer can't be sure that set (or whatever) hasn't been reassigned. > But I still see that as something to be addressed independently, if at > all.
If we decide to go this route (supporting braced calls), I'd quite like to see {} become a simple abbreviation for dict{}, similar to the way [] would be an abbreviation of list{} and () would be an abbreviation of tuple{}. While I felt the optimisation benefits of a set literal were worth mentioning, they're significantly less important to me than the readability benefits. Maybe {1, 2, 3} should actually result in the old pseudo-set of {1:None, 2:None, 3:None}. It eliminates the type ambiguity as bare braces would always result in a dict, and getting a real set or frozenset is just a matter of putting the relevant name before the first brace. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org _______________________________________________ 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