MNT: py2/3 compatible dict methods

This commit is contained in:
Daron Chabot
2019-02-21 14:30:22 -05:00
committed by mdavidsaver
parent 68c4c92e28
commit 0d7e92ef80
2 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ class StatsDelta(object):
else: # first call else: # first call
print >>file,"All Types" print >>file,"All Types"
for T,C in cur.iteritems(): for T,C in cur.items():
print >>file,' ',T,C print >>file,' ',T,C
self.stats, self.ntypes = cur, len(cur) self.stats, self.ntypes = cur, len(cur)
@ -117,7 +117,7 @@ def periodic(period=60.0, file=sys.stderr):
T.start() T.start()
if __name__=='__main__': if __name__=='__main__':
#for T,C in gcstats().iteritems(): #for T,C in gcstats().items():
# print T,C # print T,C
gc.set_debug(gc.DEBUG_COLLECTABLE|gc.DEBUG_INSTANCES|gc.DEBUG_OBJECTS) gc.set_debug(gc.DEBUG_COLLECTABLE|gc.DEBUG_INSTANCES|gc.DEBUG_OBJECTS)
S=StatsDelta() S=StatsDelta()

View File

@ -317,7 +317,7 @@ class TableBase(object):
setattr(self, k, G) setattr(self, k, G)
# Populate groups with parameters # Populate groups with parameters
for g,G in rgroups.iteritems(): for g,G in rgroups.items():
ps = G._params = [rparams[v] for v in g.params] ps = G._params = [rparams[v] for v in g.params]
# reverse mapping from parameter to group(s) # reverse mapping from parameter to group(s)
for P in ps: for P in ps: