mdickinson / refcycle

Support for displaying and analyzing reference graphs of Python objects.
Apache License 2.0
15 stars 1 forks source link

Make ObjectGraph(iterator) safe; don't use .values, .items, .keys #13

Closed mdickinson closed 10 years ago

mdickinson commented 10 years ago

In preparation for updating code to work with Python 3: don't use dict.values, dict.keys, dict.items anywhere; use the dict.iter* variants instead.

Also make it safe to create an ObjectGraph from an iteration; the previous code for the ObjectGraph constructor needlessly iterated through its input twice.