[Python-Dev] Retrieve an arbitrary element from a set without removing it
Chris Bergstresser
chris at subtlety.com
Tue Oct 27 18:33:29 CET 2009
On Tue, Oct 27, 2009 at 11:06 AM, Georg Brandl <g.brandl at gmx.net> wrote:
> Sorry to nitpick, but there is no list.get().
No? How ... odd. I guess it wouldn't have come up, but I was sure
there was a .get method which took an optional default parameter if
the index didn't exist, mirroring the dict method. Still, I think my
point stands--it's a clear extrapolation from the existing dict.get().
-- Chris
More information about the Python-Dev
mailing list