You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I not infrequently want to get itens from an OrderedDict by their index. There doesn't seem to be a public-facing API for this, I usually use dict.keys. As this is unlikely to break I suggest we add a function. Note that keys(dict)[idx] does not work because keys returns a non-indexable KeySet. It might be nice to create an indexable KeySet object, though that seems like more effort than this problem calls for.
The text was updated successfully, but these errors were encountered:
I not infrequently want to get itens from an
OrderedDict
by their index. There doesn't seem to be a public-facing API for this, I usually usedict.keys
. As this is unlikely to break I suggest we add a function. Note thatkeys(dict)[idx]
does not work becausekeys
returns a non-indexableKeySet
. It might be nice to create an indexableKeySet
object, though that seems like more effort than this problem calls for.The text was updated successfully, but these errors were encountered: