Guido van Rossum schrieb: > 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.
Which means of course that users will pick up that idiom when they're creating nonempty sets in their own code, thus causing the issues Raymond mentioned. Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out. _______________________________________________ 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