On Tue, Jan 12, 2016 at 11:29 PM, Steven D'Aprano <st...@pearwood.info> wrote: > On Wed, 13 Jan 2016 06:12 am, Bernardo Sulzbach wrote: > >> I saw it in another answer. next(iter(d)) is still the winner. > > Except that doesn't return the *value*, it returns the *key*. >
There is a typo, sorry. I assume that what is passed to iter is a dict_values object. >> This resembles a list just too much, making the coder's intent harder >> to understand. This is **very** subjective, of course. > > I'm sorry, I don't understand what you mean by "resembles a list"? What > does? In what way? > [a] = d.values() resembles a list too much to my eyes. -- Bernardo Sulzbach -- https://mail.python.org/mailman/listinfo/python-list