[EMAIL PROTECTED] wrote: > > ...Missing that, I think dict() and set() and > tuple() and list() look better than using {} for the empty dict and > {/} for the empty set and () for empty tuple (or {} for the empty dict > and set() for the empty set).
The problem I have with them is in no way the looks, it is that they are not strictly equivalent as they imply dictionary lookups. Which shows in performance, eg >>> import timeit >>> timeit.Timer('[]').timeit() 0.22358344426456436 >>> timeit.Timer('list()').timeit() 0.54574505977715049 >>> timeit.Timer('{}').timeit() 0.21328632549668214 >>> timeit.Timer('dict()').timeit() 0.50557906102591232 Cheers, BB -- http://mail.python.org/mailman/listinfo/python-list