Manual Python 3 fixes for the dict.key() function which returns a list or iterator in Python 2 or 3.
This matches r26519 in trunk.
Authored by: bugman 2014-11-11
Parent: [r26533]
Child: [r26535]