
Nov. 30, 2000
8:44 a.m.
[Me]
Hmmm...actually, I've been wanting a method .key() for dictionaries a long time. So if we give dictionaries this one small method, then we *can* do this in Python.
[MAL]
Shouldn't be hard to do... the C API for this is already in place: PyDict_Next(). I'd prefer a method .getitem(), though, which then returns a tuple (key, value).
Well, I'm sure the C API allows it. And if we do it, we might as well do it right: add .key(), .value() and .item(). -- Moshe Zadka <moshez@math.huji.ac.il> -- 95855124 http://advogato.org/person/moshez