pyldap / pyldap

THIS FORK IS DEPRECATED; development moved to python-ldap
https://github.com/python-ldap/python-ldap
Other
105 stars 34 forks source link

[py3]: Avoid changing dictionary while looping through it #105

Closed encukou closed 7 years ago

encukou commented 7 years ago

This is continuation of #104:

hroncok commented 7 years ago

Will continue the discussion here:

@encukou wrote:

@tiran: Actually, the keys() is necessary. This is not a regular dict, but a python-ldap cidict (though it only holds OIDs). And cidict wasn't designed for just iterating over it.

I've just looked at this (out of curiosity) and this is what I found: cidict is an UserDict and that is iterabale on Python 3, but not on Python 2, the Python 2 documentation even says: For backward compatibility, instances of UserDict are not iterable.