diff options
author | 2017-08-08 13:50:40 -0700 | |
---|---|---|
committer | 2017-08-08 13:50:40 -0700 | |
commit | 6fb66f45ae16369f0018cc2fb49761988bdbb457 (patch) | |
tree | 292051e65703da6dc2bce32d5913d106e85153f4 /Python | |
parent | b8624d280001a044678fce8aa2d034b51219122f (diff) | |
download | WarpX-6fb66f45ae16369f0018cc2fb49761988bdbb457.tar.gz WarpX-6fb66f45ae16369f0018cc2fb49761988bdbb457.tar.zst WarpX-6fb66f45ae16369f0018cc2fb49761988bdbb457.zip |
version of iteritems() that works with Python 2 and 3
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pywarpx/Bucket.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/pywarpx/Bucket.py b/Python/pywarpx/Bucket.py index 916b030d1..5c429f530 100644 --- a/Python/pywarpx/Bucket.py +++ b/Python/pywarpx/Bucket.py @@ -1,3 +1,4 @@ +from six import iteritems class Bucket(object): """ @@ -24,7 +25,7 @@ class Bucket(object): def attrlist(self): "Concatenate the attributes into a string" result = [] - for attr, value in self.argvattrs.iteritems(): + for attr, value in iteritems(self.argvattrs): # --- repr is applied to value so that for floats, all of the digits are included. # --- The strip is then needed when value is a string. attrstring = '{0}.{1}={2} '.format(self.instancename, attr, repr(value).strip("'\"")) |