Eric> Given items(), I don't see why you'd ever need "zip(a.keys(), Eric> a.values())" to work.
Eric> Antoine makes many of these same points in the issue comments. And as I pointed out there's no telling what users will do. The zip(keys,values) behavior works for dicts and has probably worked for other mapping types. I'm just asking here whether or not the Python documentation should be more explicit about what is and isn't expected of mapping types. Eric> But then I have no current or imagined use case that would rely on Eric> this behavior. Others may of course disagree. Has anyone ever seen Eric> code that relies on this? Might such code predate items()? Or might accidentally work: keys = d.keys() ...do something with keys and other lists... # sometime later... vals = d.values() ...do something with vals and those other lists... It might just be by accident that the code works, or it might be code which, as you indicated, predates items() (though it's been around quite awhile now). The point of only addressing this to the topic of Python 3 is that this is presumed to be the place where we remove as many warts as possible. It would also be nice to tighten up the documentation in these somewhat murky areas. Skip _______________________________________________ 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