On 4/25/07, guido.van.rossum <[EMAIL PROTECTED]> wrote:
> +        implementation.)  **Open issues:** Forcing every mutable set
> +        to implement this may be a pain for such a fairly
> +        non-essential method.  Perhaps just drop it?

There are also comments worrying that an abstract implementation would
be horribly slow -- but so what?

Alex Martelli posted some stats (for dicts, I think) showing that
(even today) clear was slower than just creating a new object.   It
still makes sense if you care about the "is" relation

Since you are keeping "pop", the abstract implementation can at least
approximate iteration.

    def clear(self):
        while self.pop(): pass

-jJ
_______________________________________________
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