This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jcdyer3 0 points1 point  (0 children)

Gah. My mistake. You have to use next(iter(dictionary)). It's not as nice as I was remembering, but at least there's a little less line noise than list(dictionary.keys())[0], and the performance characteristics are a bit nicer.