Why does Python iter () return iterkeys () instead of iteritems () when displayed?

It seems that if you want to get the keys for matching, you ask for them; otherwise give me a full match (consisting of a set of key-value pairs). Is there a historical reason for this?

+6
python iteration mapping
source share
1 answer

Give up this thread to discuss the reasons for this behavior (including that Guido loves him, and that is unlikely to change ).

+8
source share

All Articles