Ron Adam a écrit : > Raymond Hettinger wrote: >>I forsee {} vs {/} as being a prominent entry on everyone's list of Python >>pitfalls, faqs, and common errors. Maybe PyLint or PyChecker will be able to >>scan to see how the object is used and determine whether the two were >>mixed-up. >> > > I think I really prefer the {:} for an empty dictionary, and {} for an > empty set.
Actually I think we need both {/} as the empty set and {:} as the empty dict. {} should raise SyntaxError, '{} is ambiguous, use {/} for set, {:} for dict' If we decide to have both dict and set litteral, {} will *always* be ambiguous. Lots of bugs can be avoided if we just forbid it. Baptiste _______________________________________________ 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