On Jan 26, 2008 1:45 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> Am strongly -1 on changing the repr for set to set({a, b, c}) .   Creating an 
> innermost frozenset doubles the memory consumption.

Raymond, I think you're overestimating how often the repr() of a set
actually gets eval()'ed. I expect this happens approximately never. I
certainly haven't used it myself, and most certainly not in a
performance-critical context.

The reason that repr() returns an eval()'able expression isn't that
the expression is likely to be eval()'ed -- it is that the programmer
is already familiar with the notation and can thus immediately
understand what it means.

>From an understandability POV, set({...}) is simpler than set([...])
because the list is just a distraction.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
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

Reply via email to