> Would the argument be the key, or the pair? I'd guess the key. Right, the key.
> If so, there's the 2-arg flavor of dict.pop(): > > >>> d = {} > >>> d.pop("key", None) > > It's not terribly obvious, but does the job without enlarging > the dict API. Yeah, this looks good. I don't think I've ever used it like this. -- Gustavo Niemeyer http://niemeyer.net _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com